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 need exexution process for JCL programs
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
Is it possible to define dd statements as you want?
what is the purpose of coding class parameter in job statement?
When space is allocated for an output dataset, what units can be used?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
what operation is performed by job statement?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
List the different jcl statements that are not permitted in the procedures?
Why include statement is used in a jcl?
What are the parameters that are used in creating a gdg?
What is the motivation behind coding class parameter in job statement?
Name a few IBM utility programs, and explain its function.