HP 3000 Manuals

Data Division in the Report Writer Module (cont.) [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference - Additional Topics

Data Division in the Report Writer Module (cont.) 

Presentation Rules Tables 

Description.   

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 later in this chapter.)

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.

       For OSVS only:  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-3 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.

          a.  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.

          b.  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.

          a.  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.

          b.  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.

          c.  The report heading report group is not presented.

          d.  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.

          a.  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.

          b.  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.

          c.  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.

          a.  After the report heading report group is presented, the
              RWCS places the NEXT GROUP integer into LINE-COUNTER as the
              final LINE-COUNTER setting.

          b.  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.

          c.  After the report heading report group is presented, the
              RWCS places zero into LINE-COUNTER as the final
              LINE-COUNTER setting.

          d.  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.

          e.  LINE-COUNTER is unaffected by the processing of a
              non-printable report group.

          Table 1-3:  Report Heading Group Presentation Rules 

-------------------------------------------------------------------------------------------------
|         |                                                                                     |
|   **    |                                 Applicable Rules***                                 |
|         |                                                                                     |
-------------------------------------------------------------------------------------------------
|         |                                                              |                      |
|         |               If the Page clause is specified.               |  If the Page clause  |
|         |                                                              |     is omitted.      |
|         |                                                              |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |          |           |
| Sequence|  NEXT GROUP  | Upper  | Lower  | First  |  Next  |   Final   |  First   |   Final   |
| of LINE |    Clause    | Limit  | Limit  | Print  | Group  |   LINE-   |  Print   |   LINE-   |
| NUMBER  |              |        |        |  Line  |        |  COUNTER  |   Line   |  COUNTER  |
| Clauses*|              |        |        | Posi-  |        |  setting  | Position |  Setting  |
|         |              |        |        |  tion  |        |           |          |           |
|         |              |        |        |        |        |           |          |           |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|   AR    |   Absolute   |   1    |   2a   |   3a   |   4a   |    5a     | Illegal              |
|         |              |        |        |        |        |           | Combination+         |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|   AR    |   Relative   |   1    |   2a   |   3a   |   4b   |    5b     | Illegal              |
|         |              |        |        |        |        |           | Combination+         |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|   AR    |  NEXT PAGE   |   1    |   2b   |   3a   |   4c   |    5c     | Illegal              |
|         |              |        |        |        |        |           | Combination+         |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|   AR    |              |   1    |   2a   |   3a   |        |    5d     | Illegal              |
|         |              |        |        |        |        |           | Combination+         |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|    R    |   Absolute   |   1    |   2a   |   3b   |   4a   |    5a     | Illegal              |
|         |              |        |        |        |        |           | Combination ++       |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |          |           |
|    R    |   Relative   |   1    |   2a   |   3b   |   4b   |    5b     |    3d    |    5b     |
|         |              |        |        |        |        |           |          |           |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |                      |
|    R    |  NEXT PAGE   |   1    |   2b   |   3b   |   4c   |    5c     | Illegal              |
|         |              |        |        |        |        |           | Combination ++       |
|         |              |        |        |        |        |           |                      |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |          |           |
|    R    |              |   1    |   2a   |   3b   |        |    5d     |    3d    |    5d     |
|         |              |        |        |        |        |           |          |           |
-------------------------------------------------------------------------------------------------
|         |              |        |        |        |        |           |          |           |
|         |              |        |        |   3c   |        |    5e     |    3c    |    5e     |
|         |              |        |        |        |        |           |          |           |
-------------------------------------------------------------------------------------------------

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

**     A blank entry in column1 or column 2 indicates that the names
       clause is totally absent from the report group description entry.

***    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.

+      See the section The LINE NUMBER Clause.

++     See the section The NEXT GROUP Clause.

Page Heading Group Presentation Rules.   

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

          Table 1-4 :  Page Heading Group Presentation Rules 

-----------------------------------------------------------------------
|                   |                                                 |
|        **         |               Applicable Rules***               |
|                   |                                                 |
-----------------------------------------------------------------------
|          |        |                                                 |
|          |        |       If the PAGE clause is specified****       |
|          |        |                                                 |
-----------------------------------------------------------------------
|          |        |        |        |          |        |           |
| Sequence |  NEXT  | Upper  | Lower  |  First   |  Next  |   Final   |
| of LINE  | GROUP  | Limit  | Limit  |  Print   | Group  |   LINE-   |
|  NUMBER  | clause |        |        |   Line   |        |  COUNTER  |
| clauses* |        |        |        | Position |        |  Setting  |
|          |        |        |        |          |        |           |
-----------------------------------------------------------------------
|          |        |        |        |          |        |           |
|    AR    |        |   1    |   2    |    3a    |        |    4a     |
|          |        |        |        |          |        |           |
-----------------------------------------------------------------------
|          |        |        |        |          |        |           |
|    R     |        |   1    |   2    |    3b    |        |    4a     |
|          |        |        |        |          |        |           |
-----------------------------------------------------------------------
|          |        |        |        |          |        |           |
|          |        |        |        |    3c    |        |    4b     |
|          |        |        |        |          |        |           |
-----------------------------------------------------------------------

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

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

***     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.

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

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.

          a.  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.

          b.  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.

          c.  The page heading report group is not presented.

   4.  Final LINE-COUNTER setting rules.

          a.  The final LINE-COUNTER setting is the line number on which
              the final print line of the page heading report group was
              presented.

          b.  LINE-COUNTER is unaffected by the processing of a
              nonprintable report group.

Body Group Presentation Rules.   

Table 1-5 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.

          a.  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.

          b.  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.

          c.  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.

          Table 1-5:  Body Group Presentation Rules 

------------------------------------------------------------------------------------------------------
|         |                                                                              |           |
|   **    |                             Applicable Rules***                              |           |
|         |                                                                              |           |
------------------------------------------------------------------------------------------------------
|         |                                                         |                    |           |
|         |            If the Page clause is specified.             |    If the Page     |           |
|         |                                                         |     clause is      |           |
|         |                                                         |      omitted.      |           |
|         |                                                         |                    |           |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |        |           |
| Sequence|  NEXT GROUP  | Upper  | Lower  | Fit  | First  |  Next  |   Final   | First  |   Final   |
| of LINE |    Clause    | Limit  | Limit  | Test | Print  | Group  |   LINE-   | Print  |   LINE-   |
| NUMBER  |              |        |        |      |  Line  |        |  COUNTER  |  Line  |  COUNTER  |
| Clauses*|              |        |        |      | Posi-  |        |  setting  | Posi-  |  Setting  |
|         |              |        |        |      |  tion  |        |           |  tion  |           |
|         |              |        |        |      |        |        |           |        |           |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   AR    |   Absolute   |   1    |   2    |  3a  |   4a   |   5    |    6a     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   AR    |   Relative   |   1    |   2    |  3a  |   4a   |        |    6b     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   AR    |  NEXT PAGE   |   1    |   2    |  3a  |   4a   |        |    6c     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   AR    |              |   1    |   2    |  3a  |   4a   |        |    6d     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|    R    |   Absolute   |   1    |   2    |  3b  |   4b   |   5    |    6a     | Illegal            |
|         |              |        |        |      |        |        |           | Combination++      |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |        |           |
|    R    |   Relative   |   1    |   2    |  3b  |   4b   |        |    6b     |   4d   |    6f     |
|         |              |        |        |      |        |        |           |        |           |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|    R    |  NEXT PAGE   |   1    |   2    |  3b  |   4b   |        |    6c     | Illegal            |
|         |              |        |        |      |        |        |           | Combination++      |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |        |           |
|    R    |              |   1    |   2    |  3b  |   4b   |        |    6d     |   4d   |    6d     |
|         |              |        |        |      |        |        |           |        |           |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   NPR   |   Absolute   |   1    |   2    |  3c  |   4a   |   5    |    6a     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   NPR   |   Relative   |   1    |   2    |  3c  |   4a   |        |    6b     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   NPR   |  NEXT PAGE   |   1    |   2    |  3c  |   4a   |        |    6c     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |                    |
|   NPR   |              |   1    |   2    |  3c  |   4a   |        |    6d     | Illegal            |
|         |              |        |        |      |        |        |           | Combination+       |
|         |              |        |        |      |        |        |           |                    |
------------------------------------------------------------------------------------------------------
|         |              |        |        |      |        |        |           |        |           |
|         |              |        |        |      |   4c   |        |    6e     |   4c   |    6e     |
|         |              |        |        |      |        |        |           |        |           |
------------------------------------------------------------------------------------------------------

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

**     A blank entry in column1 or column 2 indicates that the names
       clause is totally absent from the report group description entry.

***    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.

+      See the section The LINE NUMBER Clause.

++     See the section The NEXT GROUP Clause.

4.   First print line position rules.

        *   The first print line of the body group is presented on the
            line number specified by the integer of its LINE NUMBER
            clause.

        *   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.

        *   The body group is not presented.

        *   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.

        *   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.

        *   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.

        *   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.

        *   The final LINE-COUNTER setting is the line number on which
            the final print line of the body group was presented.

        *   LINE-COUNTER is unaffected by the processing of a
            nonprintable body group.

        *   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.

Page Footing Presentation Rules.   

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

          Table 1-6 :  Page Footing Group Presentation Rules 

----------------------------------------------------------------------------------------------------------
|                             |                                                                          |
|             (1)             |                           Applicable Rules(2)                            |
|                             |                                                                          |
----------------------------------------------------------------------------------------------------------
|              |              |                                                                          |
|              |              |                   If the PAGE clause is specified(3)                     |
|              |              |                                                                          |
----------------------------------------------------------------------------------------------------------
|              |              |              |              |              |              |              |
|   Sequence   |     NEXT     |    Upper     |    Lower     | First Print  |     Next     |    Final     |
|   of LINE    |    GROUP     |    Limit     |    Limit     |     Line     |    Group     | LINE-COUNTER |
|    NUMBER    |    clause    |              |              |   Position   |              |   Setting    |
| clauses(4)   |              |              |              |              |              |              |
|              |              |              |              |              |              |              |
----------------------------------------------------------------------------------------------------------
|              |              |              |              |              |              |              |
|      AR      |   Absolute   |      1       |      2       |      3a      |      4a      |      5a      |
|              |              |              |              |              |              |              |
----------------------------------------------------------------------------------------------------------
|              |              |              |              |              |              |              |
|      AR      |   Relative   |      1       |      2       |      3a      |      4b      |      5b      |
|              |              |              |              |              |              |              |
----------------------------------------------------------------------------------------------------------
|              |              |              |              |              |              |              |
|      AR      |              |      1       |      2       |      3a      |              |      5c      |
|              |              |              |              |              |              |              |
----------------------------------------------------------------------------------------------------------
|              |              |              |              |              |              |              |
|              |              |              |              |      3b      |              |      5d      |
|              |              |              |              |              |              |              |
----------------------------------------------------------------------------------------------------------

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

(2) 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.

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

(4) 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.

          a.  The first print line of the page footing report group is
              presented on the line specified by the integer of its LINE
              NUMBER clause.

          b.  The page footing report group is not presented.

   4.  Next group rules.

          a.  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.

          b.  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.

          a.  After the page footing report group is presented, the RWCS
              places the NEXT GROUP integer into LINE-COUNTER as the
              final LINE-COUNTER setting.

          b.  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.

          c.  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.

          d.  LINE-COUNTER is unaffected by the processing of a
              nonprintable report group.

Report Footing Presentation Rules.   

Table 1-7 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.

          a.  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.

          b.  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:

          a.  The first print line of the report footing report group is
              presented on the line specified by the integer of its LINE
              NUMBER clause.

          b.  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.

          c.  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.

          d.  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.

          e.  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.

          f.  The report footing report group is not presented.

   4.  Final LINE-COUNTER setting rules.

          a.  The final LINE-COUNTER setting is the line number on which
              the final print line of the report footing report group is
              presented.

          b.  LINE-COUNTER is unaffected by the processing of a
              nonprintable report group.

          Table 1-7:  Report Footing Presentation Rules 

--------------------------------------------------------------------------------------------
|          |                                                                   |           |
|    **    |                        Applicable Rules***                        |           |
|          |                                                                   |           |
--------------------------------------------------------------------------------------------
|          |        |                                               |                      |
|          |        |       If the Page clause is specified.        |  If the Page clause  |
|          |        |                                               |     is omitted.      |
|          |        |                                               |                      |
--------------------------------------------------------------------------------------------
|          |        |        |        |        |        |           |          |           |
| Sequence |  NEXT  | Upper  | Lower  | First  |  Next  |   Final   |  First   |   Final   |
| of LINE  | GROUP  | Limit  | Limit  | Print  | Group  |   LINE-   |  Print   |   LINE-   |
|  NUMBER  | Clause |        |        |  Line  |        |  COUNTER  |   Line   |  COUNTER  |
| Clauses* |        |        |        | Posi-  |        |  setting  | Position |  Setting  |
|          |        |        |        |  tion  |        |           |          |           |
|          |        |        |        |        |        |           |          |           |
--------------------------------------------------------------------------------------------
|          |        |        |        |        |        |           |                      |
|    AR    |        |   1a   |   2    |   3a   |        |    4a     | Illegal              |
|          |        |        |        |        |        |           | Combination+         |
|          |        |        |        |        |        |           |                      |
--------------------------------------------------------------------------------------------
|          |        |        |        |        |        |           |          |           |
|    R     |        |   1a   |   2    |   3b   |        |    4a     |    3d    |    4a     |
|          |        |        |        |        |        |           |          |           |
--------------------------------------------------------------------------------------------
|          |        |        |        |        |        |           |                      |
|   NPR    |        |   1b   |   2    |   3c   |        |    4a     | Illegal              |
|          |        |        |        |        |        |           | Combination+         |
|          |        |        |        |        |        |           |                      |
--------------------------------------------------------------------------------------------
|          |        |        |        |        |        |           |          |           |
|          |        |        |        |   3e   |        |    4b     |    3e    |    4b     |
|          |        |        |        |        |        |           |          |           |
--------------------------------------------------------------------------------------------

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

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

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

+      See the section The LINE NUMBER Clause.

The COLUMN NUMBER Clause 

Function.   

The COLUMN NUMBER clause identifies a printable item and specifies the
position of the item on a print line.

General Format.   

[]
Syntax Rules. 1. The COLUMN NUMBER clause can be specified only at the elementary level in a report group. The COLUMN NUMBER clause, if present, must appear in or be subordinate to an entry that contains a LINE NUMBER clause. 2. Within a given print line, the printable items should be defined in ascending column number order such that each printable item defined occupies a unique sequence of contiguous character positions. For OSVS only: No restrictions on the sequence of COLUMN NUMBER clauses are enforced. General Rules. 1. The COLUMN NUMBER clause indicates that the object of a SOURCE clause or the object of a VALUE clause or the sum counter defined by a SUM clause is to be presented on the print line. The absence of a COLUMN NUMBER clause indicates that the entry is not to be presented on a print line. 2. Integer-1 specifies the column number of the leftmost character position of the printable item. 3. The RWCS supplies space characters for all positions of a print line that are not occupied by printable items. 4. The leftmost position of the print line is considered to be column number 1. The DATA-NAME Clause Function. A data-name specifies the name of the data item being described. General Format.
[]
Syntax Rule. In the report section data-name-1 need not appear in a data description entry. General Rule. In the Report Section, data-name-1 must be given in the following cases: 1. When data-name-1 represents a report group to be referred to by a GENERATE or a USE statement in the procedure division. 2. When reference is to be made to the sum counter in the procedure division or report section. 3. When a DETAIL report group is referenced in the UPON phrase of the SUM clause. 4. When data-name-1 is required to provide sum counter qualification.


MPE/iX 5.0 Documentation