In one of intervie, my interviwer asked, I have a file
which contains 4 records I would like to split the 4
different outputs for each record how to do?
Answer Posted / kiran
You can use OUTFIL's SPLIT parameter to put the first
record into OUTPUT1, the second record into OUTPUT2, the
third record into OUTPUT1, the fourth record into OUTPUT2,
and so on until you run out of records. SPLIT splits the
records one at a time among the data sets specified by
FNAMES. The following statements split the records between
two OUTFIL data sets:
OPTION COPY
OUTFIL FNAMES=(Op1.op2,op3,op4),SPLIT
Similarly, OUTFIL's SPLITBY=n parameter splits the records
n at a time among the data sets specified by FNAMES. The
following statements split the records four at a time
between three OUTFIL data sets:
OPTION COPY
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLITBY=4
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
How to alter the parameters for the existing gdg?
What is the format of comment statement?
how to run batch program without jcl?
what are the types of abends that occur on job failure? And explain the possible causes of these
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
What are s0c1, s0c4, s0c5, s0c7 and socb?
Differentiate between addressing mode and run mode.
How to submit jcl through a cobol program?
which parameter is used to check the syntax of a jcl without executing it?
What is the use of disp parameter?
Explain the function of the steplib dd statement?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
What is condition checking in jcl? Is this possible?
what is a jcl?
What are the utility programs in jcl?