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
List the various advantages of using jcl language?
What is the function of dd disp parameter?
What is the difference between run mode and addressing mode?
How can a fb file convert to vb file using sort program?
Explain the function of //jcllib statement?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
which utility is used to run a cobol-db2 program?
What do you understand by the terms: joblib and steplib?
Name the statement which can be used to send data to another mvs jes3 node?
What is the purpose of dd dummy statement?
What is multithreading in jcl?
How dummy is used in jcl?
How to override loadlib?
Explain the jcl exec statement?
Is their any set of rules for dd? Explain.