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) Â Â Â