Let’s say we have a file with first byte having 2 different values ‘A’ or ‘B’ or any other character.
We are going to create a file with all records starting with A (DD name SORTXXA), a second file with all records starting with B (DD name SORTXXB), a third file (DD name SORTXXX) with remaining records.
SORT FIELDS=COPY OUTFIL FNAMES=SORTXXA,INCLUDE=(1,1,CH,EQ,C'A') OUTFIL FNAMES=SORTXXB,INCLUDE=(1,1,CH,EQ,C'B') OUTFIL FNAMES=SORTXXX,SAVE
- Sort card – replace selective fields (IFTHEN,WHEN)
- ICETOOL to get maximum, minimum value records
- ICETOOL to copy files
- SORT in Easytrieve
- SYMNAMES in SORT
- IBM SORT – Add a trailer record with Record Count
- ICETOOL Count
- Sort Card examples (IBM Mainframes)