Producing Printed Reports
10.8 Programming a Report Writer Report
If no GENERATE statement has been executed for the report, the TERMINATE
statement does not produce any report groups.
A second TERMINATE statement for the report must not be executed before a
second INITIATE statement for the report has been executed.
The TERMINATE statement does not close the report file; a CLOSE statement
must be executed after the TERMINATE statement.
Figure 10–13 shows the sequence of operations for TERMINATE.
Figure 10–13 TERMINATE Statement
add and save
all SUM
sum−names
save
control
values
write control
footing from
minor to major
set controls
to new values
reset SUM
operands up
to major level
produce CF
FINAL group
ZK−1554−GE
produce
PF group
produce
RF group
TERMINATE
10.8.13.5 Applying the USE BEFORE REPORTING Statement
In a COBOL program, you specify a Declarative section to define procedures
that supplement the standard procedures of the program. Note that in a Report
Writer program, you can specify the USE BEFORE REPORTING statement. This
USE BEFORE REPORTING statement gives you more control over the data to be
printed in a Report Writer program.
The USE BEFORE REPORTING statement:
•
Allows you to define declarative procedures
•
Causes those procedures to be executed just before a specified report group is
printed (this specified report group name is written with the USE statement)
•
Lets you modify the data to be printed (for example, where simple sum
operations must be augmented by more complex operations involving
multiplication, division, and subtraction)
•
Lets you suppress printing the report group
Producing Printed Reports 10–41
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......