Selecting a Page Format

Conditional processing can be used to select an active page format. Selecting the page format does not change the basic rules for processing a page format:

  • PRINTLINE commands are processed sequentially unless skip-to-channel or spacing commands are used.
  • When the end of the page format is reached, processing returns to the first PRINTLINE command in the same page format. Processing does not continue with the next page format (if any) in the page definition.

However, conditional processing does involve some additional considerations:

  • Subpages

    A page format consists of one or more subpages. A subpage is defined by a group of PRINTLINE commands followed by an ENDSUBPAGE command. If an ENDSUBPAGE command is not defined, then the entire page format is one subpage. See Subpage Description and Processing for more information.

  • Record reprocessing

    Record reprocessing is used when input records are processed according to one set of copy-group and page-format specifications, and then new specifications are invoked for the same input records. See Record Reprocessing Description and Processing for more information.

As described in Using Page Definition Commands for Traditional Line Data, a page definition is a set of controls for formatting line-data for printing on a logical page. A page definition can contain one or more page formats as shown in the following diagram.

PPFA Commands Resulting Page Definition
PAGEDEF PDEFX
.
.
PAGEFORMAT PFMTA
.
.
PRINTLINE ...
PRINTLINE ...
.
PAGEFORMAT PFMTB
.
.
PRINTLINE ...
PRINTLINE ...
.
PAGEFORMAT PFMTC
.
.
PRINTLINE ...
PRINTLINE ...
.
A resulting Page Definition

The first page format in the page definition is always active when processing of the print file begins. To invoke a new page format, use the CONDITION command.

Note: By using the BEFORE SUBPAGE and BEFORE LINE parameters, it is possible to change to a different active page format before any lines have actually been formatted.

Using the previous diagram as a reference, assume page format PFMTB is active. The page-format selections that can be made from a CONDITION command are:

condname
which starts the named page format
CURRENT
which restarts page format PFMTB
=
which restarts page format PFMTB (alternate for CURRENT)
NEXT
which starts page format PFMTC
FIRST
which starts page format PFMTA
NULL
which does not make any change to the current page format processing
/
which does not make any change to the current page format processing (alternate for NULL)

See Using the CONDITION Command to Select a Copy Group and a Page Format for more information on each of these options.