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


Please Help Members By Posting Answers For Below Questions

Matching Logic in Jcl not in cobol.Could any one please answer this question

3782


What is the function of the dd dcb keyword?

930


how you will the direct the data to spool using sysout option?

1927


State the uses of syspring, sysin, sort fields, sum fields and dummy.

747


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

1048






For what purpose steplib and joblib are used ?

760


why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.

2047


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

2072


What are the 2 types of parameters in dd statement?

730


what is use of disp parameter in dd statement?

740


which utility is used to run a cobol-db2 program?

914


What do you understand by the terms: joblib and steplib?

723


whats the diff bw the evaluate also and and?

1946


How to do automated restart when a job abend?

897


What is the function of a dd statement?

805