Best JCL Interview Questions – Splitting Input File

1. Question

//URMISPLT EXEC PGM=SORT

//SORTIN   DD DSN=MYDATA.URMI.FILEIN,DISP=SHR 
//SORTOF01 DD DSN=MYDATA.URMI.FILEOUT1, 
//            DISP=(NEW,CATLG,DELETE),
//            RECFM=FB,LRECL=50 
//SORTOF02 DD DSN=MYDATA.URMI.FILEOUT2,
//            DISP=(NEW,CATLG,DELETE),
//            RECFM=FB,LRECL=50 
//SORTOF03 DD DSN=MYDATA.URMI.FILEOUT3, 
//            DISP=(NEW,CATLG,DELETE),
//            RECFM=FB,LRECL=50 
//SYSPRINT DD SYSOUT=* 
//SYSOUT   DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//SYSIN DD *      
  SORT FIELDS=COPY 
  OUTFIL FILES=01,ENDREC=100  //*assuming input file has 300 records.
  OUTFIL FILES=02,STARTREC=101,ENDREC=200 
  OUTFIL FILES=03,STARTREC=201 
//*

Read all here
Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.