I have two files each contains 10 records. I would like to
copy both files into one output file but in alternate
sequence. for e.g. first record from file1 then record 2
from file2.....
Answer Posted / muttaiah
Mallikarjuna,
If you give sort=copy in step3. the format of o/p file is
rec1 - File1
rec2 - File1
Rec1 - File2
rec2 - File2
change the sort as:
sort fields=(4,4,ZD,A)
outrec fields=(1:1,3)
rec1 - File1
Rec1 - File2
rec2 - File1
rec2 - File2
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Is it possible to code instream data in a PROC?
what are the statements that are not valid to be included in an include statement?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
Is automatic restart possible in jcl? If yes, how?
what is use of dsn parameter in dd statement?
Explain the purpose of dd dummy statement?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
How can values be passed from the job stream to an executable program?
How does the jcl specify the job to os?
Can we call instream to catalog and catalog to instream?
What is one line to pass PARM from JCL to COBOL?
what is DSN parameter and DISP parameter is used for?
In sms datasets, what is the function of the dd mgmtclas keyword?
what is the use of IEBGENER utility?
define cond parameter in jcl?