Back to Browse

JCL - Sort part3

2.4K views
Jun 1, 2019
4:32

How to split the records from one file to 3 files? The below JCL program is used to split one file into 3 files. This is one of the ways to implement this logic. If you have any other idea, share it in the comments section //JOB Statement here... //P020 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=USER.CHANDRU.PS1,DISP=SHR //OUT1 DD DSN=USER.CHANDRU.PS2,DISP=OLD //OUT2 DD DSN=USER.CHANDRU.PS3,DISP=OLD //OUT3 DD DSN=USER.CHANDRU.PS4,DISP=OLD //SYSIN DD * OPTION COPY OUTFIL FNAMES=(OUT1,OUT2,OUT3),SAVE,SPLITBY=1 /* I have a sequential file in which there are 50 records. I want to copy all the 50 records in the reverse order into a new file. //STEP1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=INPUT FILE, // DISP=SHR //SORTOUT DD DSN=OUTPUT FILE, // DISP=(NEW,CATLG,DELETE), // DCB=*.SORTIN, // DATACLAS=DCLASS,UNIT=SYSDA //SYSIN DD * INREC OVERLAY=(81:SEQNUM,8,ZD) SORT FIELDS=(81,8,ZD,D) OUTREC BUILD=(1,80) /*

Download

0 formats

No download links available.

JCL - Sort part3 | NatokHD