Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 1 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example shows how you can sort the data records between a header record (first record) and a trailer record (last record). The CTL1CNTL data set contains:
The input records look like this:
We want to keep the MM records in place and sort the other records by the CH field in positions 16-28. We use HEADER and TRAILER to indicate the first and last records should not be sorted. We use the SORT statement to SORT ascending on positions 16-28. The output records would look like this:
Note that we could use FIRST and LAST instead of HEADER and TRAILER. |
Copyright IBM Corporation 1990, 2014
|