Producing Printed Reports
10.6 Programming a Linage-File Compaq COBOL Report
10.6.7 A Linage-File Report Example

Example 10–5 shows a Compaq COBOL program that produces a linage-file

report.

The LINAGE clause in the following File Description entry defines the logical

page areas shown in Figure 10–8:

FD MINIF1-REPORT

LINAGE IS 13 LINES LINES AT TOP 2

LINES AT BOTTOM 5.

Figure 10–8 shows a 20-line logical page that includes a top margin (T ), a page

body (P ), and a bottom margin (B ).

Figure 108 A 20-Line Logical Page

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
VM-0325A-AI
Date: 99-XXX-99
TO: XXXXXXXXXXX X XXXXXXXXXXXXXXX
XXXXXXXXXXX X XXXXXXX
XXXXXXXXXXXXXXXX XX 99999
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Dear Mr. XXXXXXXXXXXXXXX
X
X
X
X
X
X
X
X
X
X
Preprint message is here
Column
Line
P
P
P
P
P
P
T
T
P
P
P
B
B
B
B
B
P
P
P
P
6
7
8
9
10
11
1
2
3
4
5
16
17
18
19
20
12
13
14
15
12345678901234567890123456789012345678901234567890123456789012
123456
Legend: T = Top margin
P = Page body
F = Footing area
B = Bottom margin
= lines 3 through 15
= none
= lines 16 through 20
= lines 1 and 2

The first line to which the logical page can be positioned is the third line on

the page; this is the first print line. The page-overflow condition occurs when a

WRITE statement causes the LINAGE-COUNTER value to equal 15. Line 15 is

the last line on the page on which text can be written. The page advances to the

next logical page when a WRITE statement causes the LINAGE-COUNTER value

1020 Producing Printed Reports