Presentation Rules Tables

The tables and rules on the following pages specify:

  1. The permissible combinations of LINE NUMBER and NEXT GROUP clauses for each type of report group.
  2. The requirements that are placed on the use of these clauses, and
  3. The interpretation that the RWCS gives to these clauses.

Organization

There is an individual presentation rules table for each of the following types of report groups: report heading, page heading, page footing, report footing. In addition, detail report groups, control heading report groups, or control footing report groups are treated jointly in the body group presentation rules table. (See the section Body Group Presentation Rules .)

Columns 1 and 2 of a presentation rules table list all of the permissible combinations of LINE NUMBER and NEXT GROUP clauses for the designated report group type. Consequently, for the purpose of identifying the set of presentation rules that apply to a particular combination of LINE NUMBER and NEXT GROUP clauses, a presentation rules table is read from left to right, along the selected row.

The applicable rules columns of a presentation rules table are partitioned into two parts. The first part specifies the rules that apply if the report description contains a PAGE clause, and the second part specifies the rules that apply if the PAGE clause is omitted. The purpose of the rules named in the applicable rules columns is discussed below:

  1. Upper limit rules and lower limit rules.

    These rules specify the vertical subdivisions of the page within which the specified report group can be represented.

    In the absence of a PAGE clause the printed report is not considered to be partitioned into vertical subdivisions. Consequently, in the tables no upper limit rule or lower limit rule is specified for a report description in which the PAGE clause is omitted

  2. Fit test rules.

    The fit test rules are applicable only to body groups, and hence fit test rules are specified only in the body group presentation rules table. At object time the RWCS applies the fit test rules to determine whether the designated body group can be presented on the page to which the report is currently positioned.

    However, even for body groups there are no fit test rules when the PAGE clause is omitted from the report description entry.

  3. First print line position rules.

    The first print line position rules specify where on the report medium the RWCS shall present the first print line of the given report group.

    The presentation rules tables do not specify where on the report medium the RWCS shall present the second and subsequent print lines (if any) of a report group. Certain general rules determine where the second and subsequent print lines of a report group shall be presented. Refer to the LINE NUMBER clause general rules for this information.

  4. Next group rules.

    The next group rules relate to the proper use of the NEXT GROUP clause.

  5. Final LINE-COUNTER setting rules.

    The terminal values that the RWCS places in LINE-COUNTER after presenting report groups are specified by the final LINE-COUNTER setting rules.

Line Number Clause Notation

Column 1 of the presentation rules table uses a shorthand notation to describe the sequence of LINE NUMBER clauses that can appear in the description of a report group. The meaning of the abbreviations used in column 1 is as follows.

  1. The letter "A" represents one or more absolute LINE NUMBER clauses, none of which has the NEXT PAGE phrase, that appear in consecutive order in the sequence of LINE NUMBER clauses in the report group description entry.
  2. The letter "R" represents one or more relative LINE NUMBER clauses that appear in consecutive order in the sequence of LINE NUMBER clauses in the report group description entry.
  3. The letters "NP" represent one or more absolute LINE NUMBER clauses that appear in consecutive order in the sequence of LINE NUMBER clauses in the report group description entry with the phrase NEXT PAGE appearing in the first and only in the first LINE NUMBER clause.

    OSVS This entry can appear without a line number.

When two abbreviations appear together, they refer to a sequence of LINE NUMBER clauses that consists of the two specified consecutive sequences. For example "A R" refers to a report group description entry within which the "A" sequence (defined in rule 1 above) is immediately followed by the "R" sequence (defined in rule 2 above).

Line Number Clause Sequence Substitutions

Where "A R" is shown to be a permissible sequence in the presentation rules table, "A" is also permissible and the same presentation rules are applicable.

Where "NP R" is shown to be a permissible sequence in the presentation rules table, "NP" is also permissible and the same presentation rules are applicable.

Saved Next Group Integer Description

Saved next group integer is a data item that is addressable only by the RWCS. When an absolute NEXT GROUP clause specifies a vertical positioning value which cannot be accommodated on the current page, the RWCS stores that value in saved next group integer. After page advance processing, the RWCS positions the next body group using the value stored in saved next group integer.

Report Heading Group Presentation Rules

Table 1 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a report heading report group. The report heading group presentation rules are as follows:

  1. Upper limit rule.

    The first line number on which the report heading report group can be presented is the line number specified by the HEADING phrase of the PAGE clause.

  2. Lower limit rules.
    1. The last line number on which the report heading report group can be presented is the line number that is obtained by subtracting 1 from the value of integer-3 of the FIRST DETAIL phrase of the PAGE clause.
    2. The last line number on which the report heading report group can be presented is the line number specified by integer-1 of the PAGE clause.
  3. First print line position rules.
    1. The first print line of the report heading report group is presented on the line number specified by the integer of its LINE NUMBER clause.
    2. The first print line of the report heading report group is presented on the line number obtained by adding the integer of the first LINE NUMBER clause and the value obtained by subtracting 1 from the value of integer-2 of the HEADING phrase of the PAGE clause.
    3. The report heading report group is not presented.
    4. The first print line of the report heading report group is presented on the line number obtained by adding the content of its LINE-COUNTER (in this case, zero) to the integer of the first LINE NUMBER clause.
  4. Next group rules.
    1. The NEXT GROUP integer must be greater than the line number on which the final print line of the report heading report group is presented. In addition, the NEXT GROUP integer must be less than the line number specified by the value of integer-3 of the FIRST DETAIL phrase of the PAGE clause.
    2. The sum of the NEXT GROUP integer and the line number on which the final print line of the report heading report group is presented must be less than the value of integer-3 of the FIRST DETAIL phrase of the PAGE clause.
    3. NEXT GROUP PAGE signifies that the report heading report group is to be presented entirely by itself on the first page of the report. The RWCS processes no other report group while positioned to the first page of the report.
  5. Final LINE-COUNTER setting rules.
    1. After the report heading report group is presented, the RWCS places the NEXT GROUP integer into LINE-COUNTER as the final LINE-COUNTER setting.
    2. After the report heading report group is presented, the RWCS places the sum of the NEXT GROUP integer and the line number on which the final print line of the report heading report group was presented into LINE-COUNTER as the final LINE-COUNTER setting.
    3. After the report heading report group is presented, the RWCS places zero into LINE-COUNTER as the final LINE-COUNTER setting.
    4. After the report heading report group is presented, the final LINE-COUNTER setting is the line number on which the final print line of the report heading report group was presented.
    5. LINE-COUNTER is unaffected by the processing of a non-printable report group.
9 Applicable Rules10
If the PAGE Clause is specified If the PAGE Clause is omitted
Sequence of LINE NUMBER Clauses11 NEXT GROUP Clause Upper Limit Lower Limit First Print Line Position Next Group Final LINE COUNTER Setting First Print Line Position Final LINE COUNTER Setting
AR Absolute 1 2a 3a 4a 5a Illegal Combination 12
AR Relative 1 2a 3a 4b 5b Illegal Combination 12
AR NEXT PAGE 1 2b 3a 4c 5c Illegal Combination 12
AR   1 2a 3a   5d Illegal Combination 12
R Absolute 1 2a 3b 4a 5a Illegal Combination 13
R Relative 1 2a 3b 4b 5b 3b 5b
R NEXT PAGE 1 2b 3b 4c 5c Illegal Combination 13
R   1 2a 3b   5d 3d 5d
        3c   5e 3c 5e
Table 1: Report Heading Group Presentation Rules

Footnotes:

9.

A blank entry in column 1 or column 2 indicates that the named clause is totally absent from the report group description entry.

10.

A blank entry in an applicable rules column indicates the absence of the named rule for the given combination of LINE NUMBER and NEXT GROUP clauses.

11.

See the section Line Number Clause Notation for a description of the abbreviations used in column 1.

12.

See the section Line Number Clause Notation.

13.

See the section NEXT GROUP句.

Page Heading Group Presentation Rules

Table 2 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a page heading report group.

14 Applicable Rules15
If the PAGE clause is specified16
Sequence of LINE NUMBER clauses17 NEXT GROUP clause Upper Limit Lower Limit First Print Line Position Next Group Final LINE- COUNTER Setting
AR   1 2 3a   4a
R   1 2 3b   4a
        3c   4b
Table 2: Page Heading Group Presentation Rules

Footnotes:

14.

A blank entry in column 1 or column 2 indicates that the named clause is totally absent from the report group description entry.

15.

A blank entry in an applicable rules column indicates the absence of the named rule for the given combination of LINE NUMBER and NEXT GROUP clauses.

16.

If the PAGE clause is omitted from the report description entry, then a page heading report group can not be defined. (See the section TYPE句.)

17.

See the section LINE NUMBER Clause Notation for a description of the abbreviations used in column 1.

The page heading group presentation rules are as follows:

  1. Upper limit rule.

    If a report heading report group has been presented on the page on which the page heading report group is to be presented, then the first line number on which the page heading report group can be presented is one greater than the final LINE-COUNTER setting established by the REPORT HEADING.

    Otherwise the first line number on which the page heading report group can be presented is the line number specified by the HEADING phrase of the PAGE clause.

  2. Lower limit rule.

    The last line number on which the page heading report group can be presented is the line number that is obtained by subtracting one from the value of integer-3 of the FIRST DETAIL phrase of the PAGE clause.

  3. First print line position rules.
    1. The first print line of the page heading report group is presented on the line number specified by the integer of its LINE NUMBER clause.
    2. If a report heading report group has been presented on the page on which the page heading report group is to be present, then the sum of the final LINE-COUNTER setting established by the report heading report group and the integer of the first LINE NUMBER clause of the page heading report group defines the line number on which the first print line of the page heading report group is presented.

      Otherwise the sum of the integer of the first LINE NUMBER clause of the page heading report group and the value obtained by subtracting one from the value of integer-2 of the HEADING phrase of the PAGE clause defines the line number on which the first print line of the page heading report group is presented.

    3. The page heading report group is not presented.
  4. Final LINE-COUNTER setting rules.
    1. The final LINE-COUNTER setting is the line number on which the final print line of the page heading report group was presented.
    2. LINE-COUNTER is unaffected by the processing of a nonprintable report group.

Body Group Presentation Rules

Table 3 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in control heading, detail, and control footing report groups. The body group presentation rules are as follows:

  1. Upper limit rule.

    The first line number on which a body group can be presented is the line number specified by the FIRST DETAIL phrase of the PAGE clause.

  2. Lower limit rules.

    The last line number on which a control heading report group or detail report group can be presented is the line number specified by the LAST DETAIL phrase of the PAGE clause.

    The last line number on which a control footing report group can be presented is the line number specified by the FOOTING phrase of the PAGE clause.

  3. Fit test rules.
    1. If the value in LINE-COUNTER is less than the integer of the first absolute LINE NUMBER clause, then the body group is presented on the page to which the report is currently positioned.

      If the value in LINE-COUNTER is not less than the integer of the first absolute LINE NUMBER clause, the RWCS executes page advance processing. After the page heading report group (if defined) has been processed, the RWCS determines whether the saved next group integer location was set when the final body group was presented on the preceding page. (See final LINE-COUNTER setting rule 6a.)

      If saved next group integer was not set, the body group shall be presented on the page to which the report is currently positioned. If saved next group integer was set, the RWCS moves the saved next group integer into LINE-COUNTER, resets saved next group integer to zero, and reapplies this rule.

    2. If a body group has been presented on the page to which the report is currently positioned, the RWCS computes a trial sum in a work location. The trial sum is computed by adding the content of LINE-COUNTER to the integers of all LINE NUMBER clauses of the report group. If the trial sum is not greater than the body group's lower limit integer, then the report group is presented on the current page. If the trial sum exceeds the body group's lower limit integer, then the RWCS executes page advance processing. After the page heading report group (if defined) has been processed, the RWCS reapplies this rule.

      If no body group has yet been presented on the page to which the report is currently positioned, the RWCS determines whether the saved next group integer location was set when the final body group was presented on the preceding page. (See final LINE-COUNTER setting rule 6a.)

      If saved next group integer was not so set, the body group shall be presented on the page to which the report is currently positioned.

      If saved next group integer was so set, the RWCS moves the saved next group integer into LINE-COUNTER, resets saved next group integer to zero, and computes a trial sum in a work location.

      The trial sum is computed by adding the content of LINE-COUNTER to the integer one and the integers of all but the first LINE NUMBER clause of the body group. If the trial sum is not greater than the body group's lower limit integer, then the body group is presented on the current page. If the trial sum exceeds the body group's lower limit integer, the RWCS executes page advance processing. After the page heading report group (if defined) has been processed, the RWCS presents the body group on that page.

    3. If a body group has been presented on the page to which the report is currently positioned, the RWCS executes page advance processing. After the page heading report group (if defined) has been processed, the RWCS reapplies this rule.

      If no body group has yet been presented on the page to which the report is currently positioned, the RWCS determines whether the saved next group integer location was set when the final body group was presented on the preceding page. (See final LINE-COUNTER setting rule 6a.)

      If saved next group integer was not so set, the body group shall be presented on the page to which the report is currently positioned. If saved next group integer was so set, the RWCS moves the saved next group integer into LINE-COUNTER and resets saved next group integer to zero.

      If then the value in LINE-COUNTER is less than the integer of the first absolute LINE NUMBER clause, the body group shall be presented on the page to which the report is currently positioned. Otherwise the RWCS executes page advance processing. After the page heading report group (if defined) has been processed, the RWCS presents the body group on that page.

  4. First print line position rules.
    1. The first print line of the body group is presented on the line number specified by the integer of its LINE NUMBER clause.
    2. If the value in LINE-COUNTER is equal to or greater than the line number specified by the FIRST DETAIL phrase of the PAGE clause, and if no body group has previously been presented on the page to which the report is currently positioned, then the first print line of the current body group is presented on the line immediately following the line indicated by the value contained on LINE-COUNTER.

      If the value in LINE-COUNTER is equal to or greater than the line number specified by the FIRST DETAIL phrase of the PAGE clause, and if a body group has previously been presented on the page to which the report is currently positioned, then the first print line of the current body group is presented on the line that is obtained by adding the content of LINE-COUNTER and the integer of the first LINE NUMBER clause of the current body group.

      If the value in LINE-COUNTER is less than the line number specified by the FIRST DETAIL phrase of the PAGE clause, then the first printer line of the body group is presented on the line specified by the FIRST DETAIL phrase.

    3. The body group is not presented.
    4. The sum of the content of LINE-COUNTER and the integer of the first LINE NUMBER clause defines the line number on which the first print line is presented.
  5. Next group rule.

    The integer of the absolute NEXT GROUP clause must specify a line number that is not less than that specified in the FIRST DETAIL phrase of the PAGE clause, and that is not greater than that specified in the FOOTING phrase of the PAGE clause.

  6. Final LINE-COUNTER setting rules.
    1. If the body group that has just been presented is a control footing report group and if the control footing report group is not associated with the highest level at which the RWCS detected a control break, then the final LINE-COUNTER setting is the line number on which the final print line of the control footing report group was presented.

      For all other cases, the RWCS makes a comparison of the line number on which the final print line of the body group was presented and the integer of the NEXT GROUP clause. If the former is less than the latter, then the RWCS places the NEXT GROUP integer into LINE-COUNTER as the final LINE-COUNTER setting. If the former is equal to or greater than the latter, then the RWCS places the line number specified by the FOOTING phrase of the PAGE clause into LINE-COUNTER as the final LINE-COUNTER setting; in addition the RWCS places the NEXT GROUP integer into the saved next group integer location.

    2. If the body group that has just been presented is a control footing report group, and if the control footing report group is not associated with the highest level at which the RWCS detected a control break, then the final LINE-COUNTER setting is the line number on which the final print line of the control footing report group was presented.

      For all other cases the RWCS computes a trial sum in a work location. The trial sum is computed by adding the integer of the NEXT GROUP clause to the line number on which the final print line of the body group was presented. If the sum is less than the line number specified by the FOOTING phrase of the PAGE clause, then the RWCS places that sum into LINE-COUNTER as the final LINE-COUNTER setting. If the sum is equal to or greater than the line number specified by the FOOTING phrase of the PAGE clause, then the RWCS places the line number specified by the FOOTING phrase of the PAGE clause into LINE-COUNTER as the final LINE-COUNTER setting.

    3. If the body group that has just been presented is a control footing report group, and if the control footing report group is not associated with the highest level at which the RWCS detected a control break, then the final LINE-COUNTER setting is the line number on which the final print line of the control footing report group was presented.

      For all other cases the RWCS places the line number specified by the FOOTING phrase of the PAGE clause into LINE-COUNTER as the final LINE-COUNTER setting.

    4. The final LINE-COUNTER setting is the line number on which the final print line of the body group was presented.
    5. LINE-COUNTER is unaffected by the processing of a nonprintable body group.
    6. If the body group that has just been presented is a control footing report group, and if the control footing report group is not associated with the highest level at which the RWCS detected a control break, then the final LINE-COUNTER setting is the line number on which the final print line of the control footing report group was presented.

      For all other cases the RWCS places the sum of the line number on which the final print line was presented and the NEXT GROUP integer into LINE-COUNTER as the final LINE-COUNTER setting.

18 Applicable Rules19
If the PAGE Clause is specified If the PAGE Clause is omitted
Sequence of LINE NUMBER Clauses20 NEXT GROUP Clause Upper Limit Lower Limit Fit Test First Print Line Position Next Group Final LINE COUNTER Setting First Print Line Position Final LINE COUNTER Setting
AR Absolute 1 2 3a 4a 5 6a Illegal Combination 21
AR Relative 1 2 3a 4a   6b Illegal Combination 21
AR NEXT PAGE 1 2 3a 4a   6c Illegal Combination 21
AR   1 2 3a 4a   6d Illegal Combination 21
R Absolute 1 2 3b 4b 5 6a Illegal Combination 21
R Relative 1 2 3b 4b   6b 4d 6f
R NEXT PAGE 1 2 3b 4b   6c Illegal Combination 21
R   1 2 3b 4b   6d 4d 6f
NP R Absolute 1 2 3c 4a 5 6a Illegal Combination 21
NP R Relative 1 2 3c 4a   6b Illegal Combination 21
NP R NEXT PAGE 1 2 3c 4a   6c Illegal Combination 21
NP R   1 2 3c 4a   6d Illegal Combination 21
          4c   6e 4c 6e
Table 3: Body Group Presentation Rules

Footnotes:

18.

A blank entry in column 1 or column 2 indicates that the named clause is totally absent from the report group description entry.

19.

A blank entry in an applicable rules column indicates the absence of the named rule for the given combination of LINE NUMBER and NEXT GROUP clauses.

20.

See the section LINE NUMBER Clause Notation for a description of the abbreviations used in column 1.

21.

See the section LINE NUMBER句.

.

See the section NEXT GROUP句.

Page Footing Presentation Rules

Table 4 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a PAGE FOOTING report group.

22 Applicable Rules23
If the PAGE clause is specified 24
Sequence of LINE NUMBER clauses25 NEXT GROUP clause Upper Limit Lower Limit First Print Line Position Next Group Final LINE-COUNTER Setting
AR Absolute 1 2 3a 4a 5a
AR Relative 1 2 3a 4b 5b
AR   1 2 3a   5c
        3b   5d
Table 4: Page Footing Presentation Rules

Footnotes:

22.

A blank entry in column 1 or column 2 indicates that the named clause is totally absent from the report group description entry.

23.

A blank entry in an applicable rules column indicates the absence of the named rule for the given combination of LINE NUMBER and NEXT GROUP clauses.

24.

If the PAGE clause is omitted from the report description entry, then a page footing report group can not be defined. (See the section TYPE句.)

25.

See the section LINE NUMBER Clause Notation for a description of the abbreviations used in column 1

The page footing presentation rules are as follows:

  1. Upper limit rule.

    The first line number on which the page footing report group can be presented is the line number obtained by adding one to the value of integer-5 of the FOOTING phrase of the PAGE clause.

  2. Lower limit rule.

    The last line number on which the page footing report group can be presented is the line number specified by integer-1 of the PAGE clause.

  3. First print line position rules.
    1. The first print line of the page footing report group is presented on the line specified by the integer of its LINE NUMBER clause.
    2. The page footing report group is not presented.
  4. Next group rules.
    1. The NEXT GROUP integer must be greater than the line number on which the final print line of the page footing report group is presented. In addition, the NEXT GROUP integer must not be greater than the line number specified by integer-1 of the PAGE clause.
    2. The sum of the NEXT GROUP integer and the line number on which the final print line of the page footing report group is presented must not be greater than the line number specified by integer-1 of the PAGE clause.
  5. Final LINE-COUNTER setting rules.
    1. After the page footing report group is presented, the RWCS places the NEXT GROUP integer into LINE-COUNTER as the final LINE-COUNTER setting.
    2. After the page footing report group is presented, the RWCS places the sum of the NEXT GROUP integer and the line number on which the final print line of the PAGE FOOTING report group was presented into LINE-COUNTER as the final LINE-COUNTER setting.
    3. After the PAGE FOOTING report group is presented the final LINE-COUNTER setting is the line number on which the final print line of the PAGE FOOTING report group was presented.
    4. LINE-COUNTER is unaffected by the processing of a nonprintable report group.

Report Footing Presentation Rules

Table 5 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a report footing report group. The report footing presentation rules are as follows:

  1. Upper limit rules.
    1. If a page footing report group has been presented on the page to which the report is currently positioned, then the first line number on which the report footing report group can be presented is one greater than the final LINE- COUNTER setting established by the page footing report group.

      Otherwise the first line number on which the report footing report group can be presented is the line number obtained by adding one and the value of integer-5 of the PAGE clause.

    2. The first line number on which the report footing report group can be presented, is the line number specified by the HEADING phrase of the PAGE clause.
  2. Lower limit rule:

    The last line number on which the report footing report group can be presented is the line number specified by integer-1 of the PAGE clause.

  3. First print line position rules:
    1. The first print line of the report footing report group is presented on the line specified by the integer of its LINE NUMBER clause.
    2. If a page footing report group has been presented on the page to which the report is currently positioned, then the sum of the final LINE-COUNTER setting established by the page footing report group and the integer of the first LINE NUMBER clause of the report footing report group defines the line number on which the first print line of the report footing report group is presented. Otherwise the sum of the integer of the first LINE NUMBER clause of the report footing report group, and the line number specified by the value of integer-5 of the FOOTING phrase of the PAGE clause defines the line number on which the first print line of the report footing report group is presented.
    3. The NEXT PAGE phrase in the first absolute LINE NUMBER clause directs that the report footing report group is presented on a page on which no other report group has been presented. The first print line of the report footing report group is presented on the line number specified by the integer of its LINE NUMBER clause.
    4. If LINE IS NEXT PAGE is the only LINE clause in this report group, the first line of the report heading report group is presented on line HEADING integer-2.
    5. The sum of the content of LINE-COUNTER and the integer of the first LINE NUMBER clause defines the line number on which the first print line is presented.
    6. The report footing report group is not presented.
  4. Final LINE-COUNTER setting rules.
    1. The final LINE-COUNTER setting is the line number on which the final print line of the report footing report group is presented.
    2. LINE-COUNTER is unaffected by the processing of a nonprintable report group.
26 Applicable Rules27
If the PAGE Clause is specified If the PAGE Clause is omitted
Sequence of LINE NUMBER Clauses28 NEXT GROUP Clause Upper Limit Lower Limit First Print Line Position Next Group Final LINE COUNTER Setting First Print Line Position Final LINE COUNTER Setting
AR   1a 2 3a   4a Illegal Combination 29
R   1a 2 3b   4a 3d 4a
NP R   1b 2 3c   4a Illegal Combination 29
        3e   4b 3e 4b
Table 5: Report Footing Presentation Rules

Footnotes:

26.

A blank entry in column 1 or column 2 indicates that the named clause is totally absent from the report group description entry.

27.

A blank entry in an applicable rules column indicates the absence of the named rule for the given combination of LINE NUMBER and NEXT GROUP clauses.

28.

See the section LINE NUMBER Clause Notation for a description of the abbreviations used in column 1.

29.

See the section LINE NUMBER句.