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
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
How is the record format of an output dataset specified?
How do you create a temporary dataset?
How does jcl act on a cobol code?
What do you understand by jcl?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
what operation is performed by job statement?
In sms datasets, what is the function of the dd mgmtclas keyword?
What is condition checking in jcl? Is this possible?
Can we call instream to catalog and catalog to instream?
How do you access an uncatalogued dataset in a jcl?
How do you submit a job for execution?
What is multithreading in jcl?