Use the LINES parameter to define the logical pages constituting a report. The pages can be defined in three ways:
-
Using the carriage control characters automatically supplied by MFX
-
Using ANSI control characters supplied by the user
-
Using a combination of the above two methods.
Regardless of which method is selected, the number of lines defining a logical page must be equal to or greater than the total number of lines, including blank lines, required for all HEADER2, HEADER3, TRAILER2, and TRAILER3 entries plus at least one record. If multiline OUTREC is used, all lines produced from each input record will be written to the same logical page.
LINES=n
If LINES=n is specified, paging is automatic and carriage control characters are added to the beginning of each record by MFX. Because MFX requires one byte for a control character, the LRECL specified in the SORTOUT, SORTOFx, or SORTOFxx DD statement must be one byte longer than the number of bytes specified for the output record length.
Specify n as a value from 1 to 255. If report writing parameters are specified for the file(s) (e.g., HEADERs, TRAILERs, SECTIONS), the default is LINES=60.
The LINES=n specification works in conjunction with any HEADERs and TRAILERs you have specified as follows:
-
HEADER1, if specified, prints as a preface to the report. Its page is not numbered.
-
An automatic page break occurs after HEADER1. Every nth line after the completion of HEADER1 will signal the start of a new page.
-
A HEADER2 entry, if present, is the first line(s) on each page, followed by any HEADER3 entries that might be triggered either by control breaks or by PAGEHEAD specifications in the SECTIONS parameter. HEADER2 is part of the logical page.
-
A HEADER3 entry, if present, is part of a section of the report. It prints as a header for the separate report sections. HEADER3s appear in major to minor order according to the order of their associated sections.
-
If PAGEHEAD is specified, HEADER3 prints immediately below HEADER2, if specified, or at the top of the page if a HEADER2 is not specified. A HEADER3 will not print near the end of a page if there is not sufficient room on that page for at least one data record and a TRAILER2, if specified.
-
A TRAILER3 entry, if present, is part of a section of the report. It prints as a conclusion or summary for the separate report sections. TRAILER3s will appear in major to minor order according to the order of their associated sections.
-
A TRAILER2 entry, if present, will be the last line(s) on the logical page, preceded by any TRAILER3s triggered by coincidentally occurring control breaks. TRAILER2 is part of the logical page.
-
TRAILER1 will be the last page of the entire report. Its page is not numbered.
Therefore, when LINES=n is specified, all HEADER2, HEADER3, TRAILER2, and TRAILER3 entries will be included as part of n (the total number of lines in a logical page) and will print as described above.
LINES=ANSI
If LINES=ANSI is specified, user-provided ANSI control characters define the logical pages. The first byte of each output record must contain an ANSI control character (inserted, for example, by an E35 program) which is valid for the specified output device type. For example, inserting a ‘0’ in byte 1 of the output records produces double-spaced records.
The ANSI control characters which can be used with the LINES=ANSI specification are summarized in the ANSI Control Character Chart below.
If printed output is requested, the ANSI control characters do not print as part of the output record. If, however, the report is routed to a disk or tape device, the control characters are included in the output data.
The LINES=ANSI specification works in conjunction with any HEADERs or TRAILERs you have specified. If you specify HEADER2, the ANSI specification affects this header as follows:
-
After HEADER1 is output, the first logical page begins with the first line of HEADER2.
-
A logical page ends when data with a ‘1’ in the first byte are encountered. The printing of a data record beginning with a ‘1’ is delayed until after TRAILER2 and HEADER2, if specified, are output. When record printing resumes, this delayed record will be modified to have a control character ‘+’, which causes it to print over the last line of HEADER2 (or HEADER3, if HEADER3 appears at the top of the page). To prevent the data record from printing over a text line of a header, the header should end with at least one blank line, specified by a slash (/).
-
To print HEADER2 at the top of a new physical page, the HEADER2's first line should begin with a ‘1’.
-
Because you are in complete control of the paging with LINES=ANSI, you can permit HEADER2 to appear between variable numbers of printed records.
LINES=(ANSI,n)
If LINES=(ANSI,n) is specified, ANSI control characters govern vertical control, and the ‘n’ specification provides additional automatic paging. Added flexibility is provided because you can elect to double or triple space the output and still use automatic paging.
When MFX encounters a data record with a ‘1’ in the first byte, MFX begins a new logical page. If no data record begins with a ‘1’ but the next data record would cause the number of lines on the page to exceed n, MFX treats the record as if it began with a ‘1’ and begins a new page.
Refer to LINES=ANSI for information on using a HEADER2 with ANSI control characters.
The IFTRAIL parameter may not be used with LINES=n, LINES=ANSI, or LINES=(ANSI,n).
Multiline OUTREC may not be used with LINES=ANSI or LINES=(ANSI,n).