Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 5 z/OS DFSORT Application Programming Guide SC23-6878-00 |
|
This example illustrates how a report can be produced with a page header and columns of data from sorted variable-length input records, using a lookup table. The FNAMES parameter specifies the ddname (STATUS) associated with the variable-length data set for the report. The HEADER2 parameter specifies the page header to appear at the top of each page, which will consist of a line of text showing the page number (&PAGE) and date (&DATE), a blank line (2/), and two lines of text showing headings for the columns of data. The OUTREC parameter specifies the RDW and three columns of data
to appear for each input record as follows (remember that byte 5 is
the first byte of data for variable-length records):
With variable-length input records, you must account for the RDW when specifying the c: values for OUTREC, but not for headers or trailers. The 1: used for the first line of HEADER2 causes it to start in the first data byte (by contrast, 5: must be used to specify the first OUTREC data byte for variable-length records). Also, because 6: is used for the ITEM heading, 10: must be used for the ITEM data to get the heading and data to line up in columns. 120:X is used at the end of the OUTREC parameter to ensure that the data records are longer than the report records. This will result in a maximum LRECL of 121 for the variable-length OUTFIL data set (1 byte for the ANSI control character and a maximum of 120 bytes for the data). The first page of the printed report might start as follows:
|
Copyright IBM Corporation 1990, 2014
|