Previous Topic: REPORT-SECTION Control StatementNext Topic: PRINT/DUMP/TRANSLATE Control Statement


NEWPAGE Control Statement

The NEWPAGE control statement forces a top-of-form if the value of the specified field changes. The test for NEWPAGE can be made on the full field or a substring of the field. Only one NEWPAGE control statement is allowed. The format for the NEWPAGE control statement is:

NEWPAGE keyword [ON-FIRST nnn]

Control Statement Definition

NEWPAGE

Identifies the control statement. It must be followed by a space.

keyword

Identifies the field to be used for the test. When the value changes, it forces a top-of-form. This keyword must be the same keyword specified on the SORT control statement in the CONTROL-SECTION as the major sort field.

ON-FIRST nnn

Indicates that only a partial comparison is to be done on the specified keyword. The value of nnn is numeric, may be from one to three digits, and specifies the actual length of the comparison beginning with the first position of the field. The value of nnn must not exceed the length of the keyword field. For packed fields, nnn=001 will perform a two-digit check. The packed fields are CDATE, CTIME, EXPDT, LDATE, LTIME, OUTDATE, DATECLN and BTHDATE.