The Body Group Presentation Rules table below 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:
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
1 | Applicable Rules 2 | |||||||
---|---|---|---|---|---|---|---|---|
If the PAGE Clause is specified | If the PAGE Clause is omitted | |||||||
Sequence of LINE NUMBER Clauses 3 | 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 | 2 | 3a | 4a | 5 | Illegal Combination 4 | |
AR | Relative | 1 | 2 | 3a | 4a | Illegal Combination 4 | ||
AR | NEXT PAGE | 1 | 2 | 3a | 4a | Illegal Combination 4 | ||
AR | 1 | 2 | 3a | 4a | Illegal Combination 4 | |||
R | Absolute | 1 | 2 | 3b | 4b | 5 | Illegal Combination 4 | |
R | Relative | 1 | 2 | 3b | 4b | 4d | 6f | |
R | NEXT PAGE | 1 | 2 | 3b | 4b | Illegal Combination 4 | ||
R | 1 | 2 | 3b | 4b | 4d | 6f | ||
NP R | Absolute | 1 | 2 | 3c | 4a | 5 | Illegal Combination 4 | |
NP R | Relative | 1 | 2 | 3c | 4a | Illegal Combination 4 | ||
NP R | NEXT PAGE | 1 | 2 | 3c | 4a | Illegal Combination 4 | ||
NP R | 1 | 2 | 3c | 4a | Illegal Combination 4 | |||
4c | 4c | 6e |