Example 10–3 (Cont.) Page Advancing and Line Skipping
A900-PRINT-HEADERS-ROUTINE.
*
* This routine generates a form feed, writes two lines,
* skips two lines, then resets the line counter to 4 to
* indicate used lines on the current logical page.
* Line 5 on this page is the next print line.
*
ADD 1 TO PAGE-NO.
MOVE PAGE-NO TO F2H-PAGE.
WRITE FORM2-PRINT-LINE FROM FORM2-HEADER-1
WRITE FORM2-PRINT-LINE FROM FORM2-HEADER-2
MOVE 4 TO FORM2-LINE-COUNTER.
The first report, Figure 10–4, is a preprinted form letter that can be inserted
into a business envelope. This report has a logical page length of 20 lines and a
width of 80 characters. Note that this report uses only the first 15 lines on the
page. Because this is a preprinted form, the program supplies only the following
information:
•
The date for line 3
•
The customer's name for lines 3 and 13
•
The customer's address for lines 14 and 15
Figure 10–4 A 20-Line Logical Page
Column
12345678901234567890123456789012345678901234567890123456789012
Line
1
2
3
Dear Mr. XXXXXXXXXXXXXXX
4
5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
6
X
7
X
8
X
9
X
10
X
11
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
12
13
TO: XXXXXXXXXXX X XXXXXXXXXXXXXXX
XXXXXXXXXXX X XXXXXXX
14
XXXXXXXXXXXXXXXX XX 99999
15
16
17
18
19
20
10.5 Programming a Conventional File Report
AFTER ADVANCING PAGE.
BEFORE ADVANCING 2.
1
2
3
Preprint message is here
Producing Printed Reports
4
5
6
Date: 99−XXX−99
ZK−6082−GE
Producing Printed Reports 10–11
X
X
X
X
X
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?