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

What is the difference between the positional and keyword parameters? Give examples.

721


What is the maximum length of a single line of jcl?

836


Is their any set of rules for dd? Explain.

669


Explain the function of the dd dcb keyword?

713


What is notcat 2 - gs?

945






How do you access an uncatalogued dataset in a jcl?

735


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9222


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

2001


what is the purpose of coding notify parameter in job statement?

693


what is the difference between JES3 and JES2?

691


Is it possible to code instream data in a PROC?

758


Explain the function of dd disp parameter?

603


What is the function of //jcllib statement?

814


How jcl is used for testing batch programs?

723


Explain the function of //cntl statement?

665