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 |
whats the diff bw the evaluate also and and?
What is a Proc ? why do we go for a Proc ? What are the types of procs?Can we have nesting in Procs ?
i have 1000 records in input file and i want to sort it and the first 200 records to be placed in output file. how to do that??
jcl is like a complier....?
what is the use of IEBGENER utility?
I have an job having three job steps.Suppose i want to call a pgm in step2 and aproc in step3.How to write the code?
WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?
how to purge 50 initiators continuously?? console commands??
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?
Hi Please try to be to-the-point. 1) How to INCLUDE a JCL segment in a JOB ? (A Small example) 2) What is SPOOL and what is SPOOL FULL ? and how to direct the output of a Jobstep to SPOOL ?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
What is model dataset label(Model DSCB)?