Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 3 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how a fixed-length input data set can be sorted and reformatted for output. A more efficient sort is achieved by using INREC before sorting to reduce the input records as much as possible, and using OUTREC after sorting to add padding, the current date and repeated fields. The SORTIN LRECL is 80 bytes. The reformatted input records are fixed-length, and have a record
size of seven bytes (a significant reduction from the original size
of 80 bytes). They look as follows:
The SORT and OUTREC statements must refer to the fields of the reformatted input records. The reformatted output records are fixed length with a record size
of 113 bytes. SOLRF (the IBM-supplied default) is in effect, so unless
the SORTOUT LRECL is specified or available, it will automatically
be set to the reformatted record length of 113. The reformatted output
records look as follows:
Thus, the use of INREC and OUTREC allows sorting of 7-byte records rather than 80-byte records, even though the output records are 113 bytes long. |
Copyright IBM Corporation 1990, 2014
|