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


Please Help Members By Posting Answers For Below Questions

what is the purpose of coding class parameter in job statement?

721


How to pass data to a program that is coded in an exec statement?

827


Name the statement which can be used to send data to another mvs jes3 node?

604


what happens in execution stage in job processing?

655


Explain the purpose of dd * statement in jcl?

643






in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

820


How can the submitting users racf authority be overridden in a job stream?

756


What is the function of job statement in jcl?

636


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

679


Explain how can a stopped job be started again?

636


What are the parameters that are used in creating a gdg?

740


What are steplib and joblib? What for they are used?

695


Give the syntax of job specifying jcl statement.

640


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

1997


what is a jcl?

688