SORT – SKIPREC and STOPAFT
//*COPY. START WITH 4TH RECORD. STOP AFTER PRINTING 2 RECORDS
//SORTIT EXEC PGM=SORT,PARM=’ABEND’
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=USERID.SORT.INPUT,DISP=SHR
//SORTOUT DD DSN=
// DISP=(NEW,CATLG,DELETE),
// UNIT=(WORK,8),
// SPACE=(CYL,(5,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTWK01 DD UNIT=WORK,SPACE=(CYL,(5,1))
//SORTWK02 DD UNIT=WORK,SPACE=(CYL,(5,1))
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=3,STOPAFT=2
/*
//* END OF JOB
——————————————————————————————————–
In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog
——————————————————————————————————–
You may also like to look at:
Working on Mainframes – Is Change to a different technology necessary |
How to start sorting data below the report header without loosing the header?
Please refer to the title “Sort detail records between headers and trailers” in the SORT TRICKS PDF provided by IBM. ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf
If you are looking for some different answer, please provide more details. Thank you.
Pingback: SORT – PARSE – READ EXCEL (CSV) FILE IN MAINFRAMES | F1 for Mainframe