PAGE [ON channel] [pagenum]
|ON channel||Optional — The ON clause specifies a print channel as an integer value of -1 through 255. If not specified, the print channel defaults to 0, which is the current terminal session screen.|
|pagenum||Optional — An integer specifying the page number to print on the next page. Page numbering must be defined in the header or footer for this option to take effect.|
The PAGE statement advances the output device (printer or terminal) to a new page. If a header and/or a footer are defined, PAGE prints these on the new page. If the header and/or footer defines a page number field, PAGE uses the pagenum field to specify the page number to print on the new page.
The optional channel specifies the logical print channel for this output. The range of available values is -1 through 255 (inclusive). If channel=-1, output is displayed on the terminal screen. If channel is not specified, the default logical print channel is 0 (the current user terminal).
For PAGE ON channel (with channel < 0) to affect a print job, the PRINTER ON statement must have been specified. Otherwise, no operation is performed.
Before calling PAGE, you can use the HEADING and FOOTING statements to define the text to be printed at the top and bottom of each page. After calling PAGE, you can use the PRINT statement to specify the text to be printed on the new page.
Page Length and Number Settings
You can determine the current page length by calling SYSTEM(3). You can determine the current page number by calling SYSTEM(5). You can change these values by calling the ASSIGN statement.