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 function of //jcllib statement?
how to run batch program without jcl?
what is the use of IEBGENER utility?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
Which dd parameters are required?
How can an in-stream dataset be terminated?
Explain the purpose of dd * statement in jcl?
Mention the types of job control statements?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
Matching Logic in Jcl not in cobol.Could any one please answer this question
Differentiate between addressing mode and run mode.
Explain the jcl exec statement?
whats the diff bw the evaluate also and and?