SORT JCL to sort in Char format
SORT JCL to sort in Char format
If you wish to SORT on positions with specific format in desired sequence. You can use the following
sort card
SORT FIELDS=(1,15,CH,A)
The above card will sort the input file from 1st to 15th position with character format in ascending order
Example JCL is provided below.
; ; ; ;
//SETP001 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=USERID.ABC.INPFILE,
//SORTOUT DD DSN=USERID.ABC.OUTFILE,
// DISP=(,CATLG),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
SORT FIELDS=(1,15,CH,A)
/*
//*