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.....
Answers were Sorted based on User's Feedback
it will be processed in 3steps
if the data is AAA
AAA
BBB
CCC
FILE2
DDD
EEE
FFF
LIKE 10 RECS
step1:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=1,INCR=2 )
STEP:2
step2:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=2,INCR=2 )
STEP=3 SORT FIELDS = COPY
OUTREC FIELDS =(1:1,3)
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / 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 |
Answer / aks
Use df sort utility and use infile and outfile for writing
the record into output file.
| Is This Answer Correct ? | 1 Yes | 1 No |
What is jcl in mainframe, and how many types of jcl statements are there for a job?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
Explain the function of the dd dcb keyword?
i have step1,step2,step3 from where can i start coding cond parameter ?
what is “Cond= even” and “Cond=only”?
what is the default region size if I dont specify region parametre in my job card ( I know that if I specify region=0k or 0M, then the job will occupy all he available resources at the time of job execution), but I want to know the defult value for "region" paramatre.
What is the exact difference between PRTY and DPRTY
how can the same proc be re-used and called by many jobs?
there are 10 steps in jcl how to execute the steps from step2 to step8 only
What do you understand by jcl?
how to create gdg with out using idcams utility