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
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
What do you understand by the term notcat 2 – gs?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
What is one line to pass PARM from JCL to COBOL?
I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK
What is NOTCAT ?
Does jcl support automatic restart?
How can a stopped job be started again?
what sort card you will use to copy the data from one dataset to another dataset?
What is the function of the steplib dd statement?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
What is the significance of addrspc parameter in exec statement?
i want to store 20 digits . how will u do it in cobol ?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
What happens if both JOBLIB & STEPLIB is specified ?