5 programming a conventional file report – Compaq COBOL AAQ2G1FTK User Manual

Page 306

Advertising
background image

Producing Printed Reports
10.4 The Logical Page and the Physical Page

page is defined, your program must stay within those bounds; otherwise, the
printed report may not contain the correct information.

You can program two types of reports: a conventional file report or a linage file
report. Section 10.5 and Section 10.5.1 discuss these reports in detail.

10.5 Programming a Conventional File Report

A conventional file report is contained in a file that has sequential organization
and access mode, and that contains variable-length with fixed control records.
This type of report consists of one or more logical pages. The program that
produces the report uses ordinary syntax for writing sequential files, for
example, OPEN, WRITE...AFTER ADVANCING, and CLOSE statements. The
conventional report does not use linage or Report Writer facilities.

To program a conventional report, you should understand how to do the following:

Define the logical page.

Advance to the next logical page.

Program for the page-overflow condition.

Use a line counter.

The following sections discuss these topics in detail. Additionally, Section 10.5.5
contains an example of a Compaq COBOL program that produces a conventional
file report.

10.5.1 Defining the Logical Page in a Conventional Report

Your program specifies the format of your report. Using the report layout
worksheet you created, you can write a Compaq COBOL program that defines the
logical page area for a conventional report. Figure 10–3 shows the logical page
area for a conventional report. The conventional report logical page area consists
of the page areas discussed in Section 10.4.

Figure 10–3 Logical Page Area for a Conventional Report

1
2
3

ZK−6081−GE

4
5
6
7

Logical

Page

Page body line numbers

Page Body

.
.
.

10–6 Producing Printed Reports

Advertising