The TYPE clause specifies the particular type of report group that is described
by this entry and indicates the time at which the report group is to be processed
by the RWCS.
-
DETAIL report groups are processed by the RWCS
as a direct result of GENERATE statements. If a report group is other than
TYPE DETAIL its processing is an automatic RWCS function.
- The REPORT
HEADING phrase specifies a report group
that is processed by the RWCS only once, per report, as the first report group
of that report. The REPORT HEADING report group is processed during the execution
of the chronologically first GENERATE statement for that report.
- The PAGE HEADING phrase specifies a report group that is processed by the
RWCS as the first report group on each page of that report except under the
following conditions:
- A PAGE
HEADING report group is not processed on
a page that is to contain only a REPORT HEADING report group or only a REPORT
FOOTING report group.
- A PAGE HEADING report group is processed as the second report group on a
page when it is preceded by a REPORT HEADING report group that is not to be
presented on a page by itself.
(See the section Presentation Rules Tables.)
- The CONTROL HEADING phrase specifies a report group that is processed by
the RWCS at the beginning of a control group for a designated control data-name
or, in the case of FINAL, is processed during the execution of the chronologically
first GENERATE statement for that report. During the execution of any GENERATE
statement at which the RWCS detects a control break, any CONTROL HEADING report
groups associated with the highest control level of the break and lower levels
are processed.
- The
DETAIL phrase specifies a report group that is processed
by the RWCS when a corresponding GENERATE statement is executed.
- The CONTROL FOOTING phrase specifies a report group that is processed by
the RWCS at the end of a control group for a designated control data-name.
In the case of FINAL, the CONTROL FOOTING report group is processed only
once per report as the last body group of that report. During the execution
of any GENERATE statement in which the RWCS detects a control break, any CONTROL
FOOTING report group associated with the highest level of the control break
or more minor levels is presented. All CONTROL FOOTING report groups are presented
during the execution of the TERMINATE statement if there has been at least
one GENERATE statement executed for the report. (See the section The TERMINATE
Statement.)
- The PAGE
FOOTING phrase specifies a report group
that is processed by the RWCS as the last report group on each page except
under the following conditions:
- A PAGE FOOTING report group is not processed on a page that is to contain
only a REPORT HEADING report group or only a REPORT FOOTING report group.
- A PAGE FOOTING report group is processed as the second to last report group
on a page when it is followed by a REPORT FOOTING report group that is not
to be processed on a page by itself.
(See the section Presentation Rules Tables.)
- The REPORT FOOTING phrase specifies a report group that is processed by the
RWCS only once per report and as the last report group of that report. The
REPORT FOOTING report group is processed during the execution of a corresponding
TERMINATE statement, if there has been at least one GENERATE statement executed
for the report. (See the section TERMINATE文.)
- The sequence of steps that the RWCS executes when it processes a REPORT HEADING,
PAGE HEADING, CONTROL HEADING, PAGE FOOTING, or REPORT FOOTING report group
is described below.
- If a USE BEFORE REPORTING procedure references the data-name of the report
group, the USE procedure is executed.
- If a
SUPPRESS statement has been executed or if the
report group is not printable, no further processing is done for the report
group.
- If a SUPPRESS statement has not been executed and the report group is printable,
the RWCS formats the print lines and presents the report group according to
the presentation rules for that type of report group. (See the section Presentation
Rules Tables.)
- The sequence of steps that the RWCS executes when it processes a CONTROL
FOOTING report group is described below.
The GENERATE rules specify that when a control break occurs, the RWCS produces
the CONTROL FOOTING report groups beginning at the minor level, and proceeding
upwards, through the level at which the highest control break was sensed.
In this regard, it should be noted that even though no CONTROL FOOTING report
group has been defined for a given control data-name, the RWCS will still
have to execute the step described in rule 10f below if a RESET phrase in
the report description specifies that control data-name.
-
Sum counters are crossfooted; that is, all sum counters
defined in this report group that are operands of SUM clauses in the same
report group are added to their sum counters. (See the section SUM句.)
- Sum counters are rolled forward; that is, all sum counters defined in the
report group that are operands of SUM clauses in higher level CONTROL FOOTING
report groups are added to the higher level sum counters. (See the section
SUM句.)
- If a USE BEFORE REPORTING procedure references the data-name of the report
group the USE procedure is executed.
- If a SUPPRESS statement has been executed or if the report group is not printable,
the RWCS next executes the step described in rule 10e below.
- If a SUPPRESS statement has not been executed and the report group is printable,
the RWCS formats the print lines and presents the report group according to
the presentation rules of CONTROL FOOTING report groups.
- Then the RWCS resets those sum counters that are to be reset when the RWCS
processes this level in the control hierarchy. (See the section The SUM
Clause.)
- The DETAIL report group processing that the RWCS system executes in response
to a GENERATE data-name statement is described in rules 11a through 11e below.
When the description of a report includes exactly one DETAIL report group,
the detail-related processing that the RWCS executes in response to a GENERATE
report-name statement is described in rules 11a through 11e below. These steps
are performed as though a GENERATE data-name statement were being executed.
When the description of a report includes no DETAIL report groups, the detail-related
processing that the RWCS executes in response to a GENERATE report-name statement
is described in rule 11a below. This step is performed as though the description
of the report included exactly one DETAIL report group, and a GENERATE data-name
statement were being executed.
- The RWCS performs any subtotalling that has been designated for the DETAIL
report group. (See the section SUM文.)
- If a USE BEFORE REPORTING procedure refers to the data-name of the report
group, the USE procedure is executed.
- If a SUPPRESS statement has been executed or if the report group is not printable
no further processing is done for the report group.
- If the DETAIL report group is being processed as a consequence of a GENERATE
report-name statement, no further processing is done for the report group.
- If neither 11c nor 11d above applies, the RWCS formats the print lines and
presents the report group according to the presentation rules for DETAIL report
groups. (See the section Presentation Rules Tables.)
- When the RWCS is processing a CONTROL HEADING, CONTROL FOOTING, or DETAIL
report group, as described in General Rules 9, 10, and 11, the RWCS may have
to interrupt the processing of that body group after determining that the
body group is to be presented, and execute a page advance ( and process PAGE
FOOTING and PAGE HEADING report groups) before actually presenting the body
group.
-
During control break processing, the values of control
data items that the RWCS used to detect a given control break are referred
to as prior values.
- During control break processing of a CONTROL FOOTING report group, any references
to control data items in a USE procedure or SOURCE clause associated with
that CONTROL FOOTING report group are supplied with prior values.
- When a TERMINATE statement is executed, the RWCS makes the prior control
data item values available to SOURCE clause or USE procedure references in
CONTROL FOOTING and REPORT FOOTING report groups as though a control break
had been detected in the highest control data-name.
- All other data item references in report groups and their USE procedures
access the current values that are contained in the data items at the time
the report group is processed.