NEW-PAGE

Function

Writes the current page and begins a new one.

Syntax

NEW-PAGE [erase_from_line_num_lit|_var|_col]

Arguments

erase_from_line_num_lit|_var|_col

Numeric column, variable, or literal for line printers.

Description

For line printers, NEW-PAGE can optionally erase the old page starting at a specified line. After this action is performed, the location on the page is unchanged—that is, the value of #CURRENT-LINE is the same. The default action is to erase the entire page and reset #CURRENT-LINE to its initial value for the page.

In reports where an overflow page is needed, sometimes it is useful to retain information from the first page on succeeding pages.

Each NEW-PAGE occurrence adds a form feed character to the output file unless you specify FORMFEED=NO in the DECLARE-LAYOUT for this program in the SETUP section.

Note:

A NEW-PAGE automatically occurs if page overflow is detected. Tabular reports do not require explicit NEW-PAGE commands; use NEXT-LISTING instead.

Examples

new-page  5
    ! Write current page, then erase it beginning at line 5.