SORT JCL with STOPAFT

If you wish to stop sorting after say N number of records then you can use the following Where n is the number of records after which sorting is required to be stopped. 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)    Â