[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
Reference Manual


Previous Contents Index


Appendix D
Report Writer Presentation Rules and Tables

The tables and rules in this appendix specify the following:

  • The permissible combinations of LINE NUMBER and NEXT GROUP clauses for each type of report group
  • The requirements for the use of these clauses
  • The interpretation that the Report Writer Control System (RWCS) gives to these clauses

D.1 Organization

There is an individual presentation rules table for each of the following types of report groups: REPORT HEADING, PAGE HEADING, PAGE FOOTING, and REPORT FOOTING. In addition, DETAIL report groups, CONTROL HEADING report groups, and CONTROL FOOTING report groups are treated jointly in the Body Group Presentation Rules Table.

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, to identify the set of presentation rules that applies to a particular combination of LINE NUMBER and NEXT GROUP clauses, read a presentation rules table from left to right along the selected row.

The applicable rules columns of a presentation rules table are divided 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 explanation of the rules named in the applicable rules columns follows:

  • Upper-limit rules and lower-limit rules:
    These rules specify the vertical subdivisions of the page within which the RWCS may present the specified report group when the PAGE clause is used.
  • Fit test rules:
    The fit test rules are applicable only to body groups when the PAGE clause is included in the Report Description entry. Therefore, fit test rules are specified only within the Body Group Presentation Rules Table. The RWCS applies the fit test rules to determine whether the designated body group can be presented on the page on which the report is currently positioned.
  • First print line position rules:
    The first print line position rules specify where on the page the RWCS presents the first print line of the given report group.
    The presentation rules tables do not specify where on the page the RWCS presents the second and subsequent print lines (if any) of a report group; this is determined by the general rules of the LINE NUMBER clause.
  • Next group rules:
    The next group rules relate to the proper use of the NEXT GROUP clause.
  • Final LINE-COUNTER setting rules:
    These rules specify the values that the RWCS places in LINE-COUNTER after presenting report groups.

D.2 LINE NUMBER Clause Notation

Column 1 of the presentation rules table uses a shorthand notation to describe the sequence of LINE NUMBER clauses that may 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 that appear in consecutive order within the sequence of LINE NUMBER clauses in the Report Group Description entry. None of the absolute LINE NUMBER clauses may have a NEXT PAGE phrase.
  2. The letter R represents one or more relative LINE NUMBER clauses that appear in consecutive order within 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 within the sequence of LINE NUMBER clauses within the NEXT PAGE phrase appearing in the first, and only the first, LINE NUMBER clause.
  4. When two abbreviations appear together, they refer to a sequence of LINE NUMBER clauses that consist 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) is immediately followed by the R sequence (defined in rule 2).
  5. A blank entry indicates that the clause is absent from the Report Group Description entry.

D.3 LINE NUMBER Clause Sequence Substitutions

Where A R is a permissible sequence in the presentation rules table, A is also permissible, and the same presentation rules apply.

Where NP R is a permissible sequence in the presentation rules table, NP is also permissible, and the same presentation rules apply.

D.4 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 that 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.

D.5 REPORT HEADING Group Presentation Rules

Figure D-1 points to the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a REPORT HEADING report group.

Figure D-1 REPORT HEADING Group Presentation Rules


REPORT HEADING Group Presentation Rules

  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 first-detail-line value 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 page-size 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 heading-line value 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 contents 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 first-detail-line 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 first-detail-line of the FIRST DETAIL phrase of the PAGE clause.
    3. NEXT GROUP NEXT PAGE signifies that the REPORT HEADING report group will appear by itself on the first page of the report. The RWCS processes no other report group while positioned at 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 these two items into LINE-COUNTER as the final LINE-COUNTER setting:
      • The NEXT GROUP integer
      • The line number on which the final print line of the REPORT HEADING report group was presented
    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 nonprintable report group.

D.6 PAGE HEADING Group Presentation Rules

Figure D-2 shows the appropriate presentation rules for all permissible combinations of LINE NUMBER and NEXT GROUP clauses in a PAGE HEADING report group.

Figure D-2 PAGE HEADING Group Presentation Rules Table


PAGE HEADING Group Presentation Rules

  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 obtained by subtracting 1 from the first-detail-line value 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 presented, then the sum of the following two items defines the line number on which the first print line of the PAGE HEADING report group is presented:
      • The final LINE-COUNTER setting established by the REPORT HEADING report group
      • The integer of the first LINE NUMBER clause of the PAGE HEADING report group

      Otherwise, the sum of the following two items defines the line number on which the first print line of the PAGE HEADING report group is presented:
      • The integer of the first LINE NUMBER clause of the PAGE HEADING report group
      • The value obtained by subtracting 1 from the heading-line value of the HEADING phrase of the PAGE clause
    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.


Previous Next Contents Index