Applying The Use Before Reporting Statement - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

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
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
10.8 Programming a Report Writer Report
add and save
all SUM
sum−names
produce
RF group
PF group
Producing Printed Reports
write control
save
control
footing from
values
minor to major
set controls
to new values
reset SUM
operands up
to major level
produce
produce CF
FINAL group
ZK−1554−GE
Producing Printed Reports 10–41

Advertisement

Table of Contents
loading

Table of Contents