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 / rookie
//**********************************************************
//STEP0011 EXEC PGM=SORT
//SORTIN DD DSN= <input file>,DISP=SHR
//SORTOFO1 DD DSN= <output file 1>,DISP=.....,
// SPACE=(....),
// DCB=....
//SORTOFO2 DD DSN= <output file 1>,DISP=.....,
// SPACE=(....),
// DCB=....
//SORTOFO3 DD DSN= <output file 1>,DISP=.....,
// SPACE=(....),
// DCB=....
//SORTOFO4 DD DSN= <output file 1>,DISP=.....,
// SPACE=(....),
// DCB=....
//*
//SYSIN DD *
OUTFIL FILES=(1,2,3,4),SPLITBY=1
/*
//
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
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.
Explain the jcl exec statement?
what operation is performed by job statement?
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
can any one plzzzzzz tell the jcl code for creating ps using idcams
Explain how can a jobs execution priority be modified?
Can an individual step be restricted from using all the jobs allowed cpu time?
what is the purpose of coding class parameter in job statement?
which utility is used to sort a file in jcl?
How to run cobol program using jcl?
What is the purpose of dd dummy statement?
What dd statement is used to supply the name of a dataset?
What do you know about jcl?
Explain how can an in-stream dataset be terminated?
What is the syntax of JCL statement?