Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Printing sectioned reports z/OS DFSORT: Getting Started SC23-6880-00 |
|||
The previous tutorial showed you how to print tailored reports using the DISPLAY operator. By using the BREAK operand of DISPLAY, you can create reports divided into sections by a character or numeric break field on which you have previously sorted. You can use formatting items with BREAK(p,m,f,formatting) in the same way you can use them with ON(p,m,f,formatting). You can also specify a string for the break title (BTITLE operand) and statistics for the individual sections (BTOTAL, BAVERAGE, BMAXIMUM, BMINIMUM and BCOUNT operands). EDBCOUNT(formatting) can be used to specify formatting items for BCOUNT. For this example, we will use the data set with books from publishers VALD and WETH, sorted by publisher and title, that we created previously. To print a report with sections by publisher showing the title and price fields with a title line, field headings, break title, break averages and totals, and overall averages and totals, write the following DISPLAY operator: DAPUBS is the ddname for the previously created VALD and WETH data set. SECTIONS is the ddname for the list data set in which you want the report to be printed. TITLE and PAGE indicate the elements to be included in the title line and their placement. Each HEADER and ON pair indicate a field to be included in the report and the heading to be used for it. BTITLE indicates a string to be used for the break title and its placement (before or after the break field). BREAK indicates the break field to be used to create sections. BAVERAGE and BTOTAL indicate section statistics to be produced at the end of each section. AVERAGE and TOTAL indicate overall statistics to be produced at the end of the report. Because SECTIONS has not been defined previously, you must add a JCL statement for it at the end of the job:
When this DISPLAY operator is run, it produces a three-page report for the SECTIONS data set that looks like this:
|
Copyright IBM Corporation 1990, 2014
|