Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Trailers and statistics z/OS DFSORT: Getting Started SC23-6880-00 |
|
You can add trailers to your report with OUTFIL's TRAILER1 (report trailer) and TRAILER2 (page trailer) parameters. You can use any combination of headers and trailers you need. Like the HEADERn parameters, the TRAILER1 and TRAILER2 parameters (as well as the TRAILER3 parameter discussed later), let you specify multi-line headings with character strings, hexadecimal strings, input fields, the current date, the current time, page numbers and blank lines. In addition, you can include edited or converted record counts, and edited or converted totals, maximums, minimums, and averages for numeric fields, in your trailers. The following statements create a report with a separate report
trailer page containing the overall record count and various overall
statistics for the revenue brought in by the branches.
For OUTFIL reports, DFSORT terminates if any header or trailer record is longer than the data records. In this case, the TRAILER1 line with DATE=(MD4/) is 46 bytes long, so the data records must be at least 46 bytes long. To increase the data length set by the OUTREC parameter from 42 bytes to 50 bytes, you can put 50:X at the end of the OUTREC parameter as shown. COUNT=(EDIT=(IIT)) shows the count of data records as three digits with leading zeros suppressed. TOT=(22,6,PD,M12,LENGTH=10) shows the total revenue as ten bytes of the M12 pattern (that is, SI,III,IIT). Similarly, AVG, MIN and MAX show the average, minimum and maximum, respectively, as ten bytes of the M12 pattern. See Converting numeric fields to different formats and Editing numeric fields, for more information on conversion and editing. Because LINES=n is not specified, the default of 60 lines per page is used. The two page result produced for RPT4 is:
The second page is the report trailer page produced for TRAILER1,
which normally starts on a new page. However, you can use OUTFIL's
BLKCCT1 parameter to avoid forcing a new page for the report trailer.
For example, if you change the first line of the OUTFIL statement
to:
The one page result produced for RPT4 is:
|
Copyright IBM Corporation 1990, 2014
|