SORT JCL to filter data using INREC or OUTREC

SORT JCL to filter data using INREC or OUTREC INREC can be used to filter or reformat the input data so that the sorting is more efficient. In the following sort card the inrec statement will take the data from 7th pos (3 bytes) and put at positions 1st(3bytes) in the   output file and take data from 56th position (4 bytes) and put at position 4th (4bytes). The soting will occur on the first 3 bytes

INREC FIELDS=(1:7,3,4:56,4)

Example JCL is provided below. ; ; ; ; //SORTIN   DD DISP=SHR,DSN=USERID.ABC.INPFILE, //SORTOUT  DD DSN=USERID.ABC.OUTFILE, //      SPACE=(TRK,(30,10),RLSE),                                 //      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)      INREC FIELDS=(1:7,3,4:56,4)