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
what is the use of IEBGENER utility?
What is the function of the dd avgrec keyword in sms datasets?
Explain how can an in-stream dataset be terminated?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
In job processing, what happens in conversion stage?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
How can the disposition of sysout datasets be set for an entire jobstream?
define cond parameter in jcl?
What are steplib and joblib?
Explain the jcl exec statement?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
When output dataset space is required, what quantity categories are used?