Example 5
SORT FIELDS=(12,4,PD,D)
RECORD TYPE=V,LENGTH=(,,,100)
OUTREC FIELDS=(1,7,5Z,5X,28,8,6X,101)
This example illustrates how a variable-length input data set can be sorted and reformatted for output. The variable part of the input records is included in the output records. The minimum input record size is 100 bytes and the maximum input record size (SORTIN LRECL or maximum record size for VSAM) is 200 bytes.
The reformatted output records are variable-length with a maximum
record size of 131 bytes. The reformatted records look as follows:
- Position
- Contents
- 1-4
- RDW (input positions 1 through 4)
- 5-7
- Input positions 5 through 7
- 8-12
- Binary zeros
- 13-17
- EBCDIC blanks
- 18-25
- Input positions 28 through 35
- 26-31
- EBCDIC blanks
- 32-n
- Input positions 101 through n (variable part of input records)