Example 4
SORT FIELDS=(7025,4,A,5048,8,A),FORMAT=ZD,EQUALS
- FIELDS
- The major control field begins on byte 7025 of each record,
is 4 bytes long, contains zoned decimal data (FORMAT=ZD), and is to
be sorted in ascending sequence.
The second control field begins on byte 5048, is 8 bytes long, has the same data format as the first field, and is also to be sorted in ascending order.
- FORMAT
- FORMAT=ZD is used to supply ZD format for the p,m,s fields and
is equivalent to specifying p,m,ZD,s for these fields. With FORMAT=f, you can mix p,m,s and p,m,f,s fields when that's convenient such as when all or most of the fields have the same format (although you can always code p,m,f,s for all fields and not use FORMAT=f, if you prefer). For example, the following are also valid uses of the FORMAT=f parameter:
SORT FORMAT=BI,FIELDS=(21,4,A,5,4,PD,A,31.3,1.4,A,52,20,A) SORT FIELDS=(16,4,A,22,8,BI,D,3,2,A),FORMAT=FI
- EQUALS
- specifies that the sequence of equal collating records is to be preserved from input to output.