Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 2 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how overflow of a summary field can be prevented when three fixed-length data sets are merged and reformatted for output. The input record size is 80 bytes. To illustrate the use of the RECORD statement, assume that SORTIN and SORTOUT are not present (that is, all input/output is handled by user exits). The reformatted input records are fixed-length with a record size
of 82 bytes (an insignificant increase from the original size of 80
bytes). They look as follows:
The MERGE and SUM statements must refer to the fields of the reformatted input records. The reformatted output records are identical to the reformatted input records. Thus, the 2-byte summary field at positions 36 and 37 in the original input records expands to a 4-byte summary field in positions 36 through 39 of the reformatted input/output record before merging. This prevents overflow of this summary field. Restriction: If OUTREC were used instead of INREC, the records would be reformatted after merging, and the 2-byte summary field might overflow. Note: This method of preventing overflow cannot be
used for negative FI summary fields because padding with zeros rather
than ones would change the sign.
|
Copyright IBM Corporation 1990, 2014
|