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 are the 2 types of parameters in dd statement?
If i am going to change some variable in a copybook( size or variable type) ,what are the changes that need to be done in the corresponding JCL.
How can i execute 5th step without executing first 4 steps?
Is condition checking possible in jcl?
What is S322 abend ?
what is the purpose of SYSOUT parameter in the DD statement?
how can u understand ps and pds from their names ?
What is the difference between run mode and addressing mode?
how to compress the data set
What does the one advantange of using IEBUPDTE?????
What is the exact difference between PRTY and DPRTY
What statement marks the end of an in-stream or catalogued procedure?