here is one requirement to fetch a set of record which is between a letter "S" and "E"....
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=* //SORTIN DD * 11111122S111111111111111E77 22222233S222222222222222E77 333333333333333333333333333 44444455S444444444444444E77 //SORTOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=COPY INCLUDE COND=(1,80,SS,EQ,C'S') ---- this will include the record which contains a character "S" within 80 byte length OUTREC PARSE=(%01=(STARTAFT=C'S',ENDBEFR=C'E',FIXLEN=80)), ...this will extract a record which is between the character "S" and "E" BUILD=(%01) /* //S1 EXEC PGM=ICEMAN //SYSOUT DD SYSOUT=* //SORTIN DD * 11111122S111111111111111E77 22222233S222222222222222E77 333333333333333333333333333 44444455S444444444444444E77 //SORTOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=COPY INCLUDE COND=(1,80,SS,EQ,C'S') ---- this will include the record which contains a character "S" within 80 byte length OUTREC PARSE=(%01=(STARTAFT=C'S',ENDBEFR=C'E',FIXLEN=80)), ...this will extract a record which is between the character "S" and "E" BUILD=(%01) /* Output ******************************** Top of Data *********************************** 111111111111111 222222222222222 444444444444444 ******************************* Bottom of Data ********************************