The PAGE Clause

The PAGE clause defines the length of a page and the vertical subdivisions within which report groups are presented.

General Format


*

Syntax Rules

  1. The HEADING, FIRST DETAIL, LAST DETAIL, and FOOTING phrases can be written in any order.
  2. Integer-1 must not exceed three significant digits in length.
  3. Integer-2 must be greater than or equal to one.
  4. Integer-3 must be greater than or equal to integer-2.
  5. Integer-4 must be greater than or equal to integer-3.
  6. Integer-5 must be greater than or equal to integer-4.
  7. Integer-1 must be greater than or equal to integer-5.
  8. The following rules indicate the vertical subdivision of the page in which each type of report group can appear when the PAGE clause is specified. (See the section Page Regions.)
    1. A report heading report group that is to be presented on a page by itself, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-2 to the line number specified by integer-1, inclusive.

      A report heading report group that is not to be presented on a page by itself, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-2 to the line number specified by integer-3 minus 1, inclusive.

    2. A page heading report group, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-2 to the line number specified by integer-3 minus 1, inclusive.
    3. A control heading or detail report group, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-3 to the line number specified by integer-4, inclusive.
    4. A control footing report group, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-3 to the line number specified by integer-5, inclusive.
    5. A page footing report group, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-5 plus 1 to the line number specified by integer-1, inclusive.
    6. A report footing report group that is to be presented on a page by itself, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-2 to the line number specified by integer-1, inclusive.

      A report footing report group that is not to be presented on a page by itself, if defined, must be defined such that it can be presented in the vertical subdivision of the page that extends from the line number specified by integer-5 plus 1 to the line number specified by integer-1, inclusive.

  9. All report groups must be described such that they can be presented on one page. The RWCS never splits a multi-line report group across page boundaries.

General Rules

  1. The vertical format of a report page is established using the integer values specified in the PAGE clause.
    1. Integer-1 defines the size of a report page by specifying the number of lines available on each page.
    2. HEADING integer-2 defines the first line number on which a report heading or page heading report group can be presented.
    3. FIRST DETAIL integer-3 defines the first line number on which a body group can be presented. Report heading and page heading report groups cannot be presented on or beyond the line number specified by integer-3.
    4. LAST DETAIL integer-4 defines the last line number on which a control heading or detail report group can be presented.
    5. FOOTING integer-5 defines the last line number on which a control footing report group can be presented. Page footing and report footing report groups must follow the line number specified by integer-5.
  2. If the PAGE clause is specified the following implicit values are assumed for any omitted phrases:
    1. If the HEADING phrase is omitted, a value of one is assumed for integer-2.
    2. If the FIRST DETAIL phrase is omitted, a value equal to integer-2 is given to integer-3.
    3. If the LAST DETAIL and the FOOTING phrases are both omitted, the value of integer-1 is given to both integer-4 and integer-5.
    4. If the FOOTING phrase is specified and the LAST DETAIL phrase is omitted, the value of integer-5 is given to integer-4.
    5. If the LAST DETAIL phrase is specified and the FOOTING phrase is omitted, the value of integer-4 is given to integer-5.
  3. If the PAGE clause is omitted, the report consists of a single page of indefinite length.
  4. The presentation rules for each type of report group are specified in the appropriate paragraph. (See the section Presentation Rules Tables.)

Pageregion Page Regions

Page regions that are established by the PAGE clause are described in the table below.

Table 1. Page Regions
Report Groups that can be represented in the Region First line no. of the Region Last line no. of the Region
Report heading described with NEXT GROUP NEXT PAGE Report footing described with LINE integer-1 NEXT PAGE integer-2 integer-1
Report heading not described with NEXT GROUP NEXT PAGE Page heading integer-2 integer-3 minus 1
Control footing Detail integer-3 integer-4
Control footing integer-3 integer-5
Page footing Report footing not described with LINE integer-1 NEXT PAGE integer-5 plus 1 integer-1