Compaq AAQ2G1FTK Marine Radio User Manual


 
Producing Printed Reports
10.6 Programming a Linage-File Compaq COBOL Report
Example 104 (Cont.) Checking for End-of-Page on a 28-Line Logical Page
A300-PRINT-DETAIL-LINE.
MOVE I-PURCHASE-DATE TO DL-DATE.
MOVE I-PURCHASE-AMOUNT TO DL-AMT.
MOVE I-PURCHASE-DESCRIP TO DL-DESC.
* At EOP this last detail line goes in footing area of current page
WRITE PRINT-LINE FROM DETAIL-LINE
AT END-OF-PAGE PERFORM A500-PRINT-HEADERS.
ADD I-PURCHASE-AMOUNT TO TOTAL-PURCHASES.
A400-PRINT-TOTALS.
MOVE TOTAL-PURCHASES TO TL.
* Skip to footing area
COMPUTE THESE-MANY = 25 - LINAGE-COUNTER.
WRITE PRINT-LINE FROM TOTAL-LINE AFTER ADVANCING THESE-MANY LINES.
MOVE 0 TO TOTAL-PURCHASES.
A500-PRINT-HEADERS.
ADD 1 TO PAGE-NUMBER.
MOVE PAGE-NUMBER TO H1-PAGE.
WRITE PRINT-LINE FROM HEAD-1 AFTER ADVANCING PAGE.
WRITE PRINT-LINE FROM HEAD-2.
MOVE SPACES TO PRINT-LINE.
WRITE PRINT-LINE.
WRITE PRINT-LINE FROM HEAD-3.
WRITE PRINT-LINE FROM HEAD-4.
WRITE PRINT-LINE FROM HEAD-5.
WRITE PRINT-LINE FROM HEAD-6.
A600-SET-UP-HEADERS.
MOVE I-FIRST TO H3-FNAME.
MOVE I-MID TO H3-MNAME.
MOVE I-LAST TO H3-LNAME.
MOVE I-ACCOUNT-NUMBER TO H3-NUM.
MOVE I-STREET TO H4-STRT.
MOVE I-CITY TO H4-CITY.
MOVE I-STATE TO H4-STATE.
MOVE I-ZIP TO H4-ZIP.
10.6.6 Printing a Linage-File Report
The default PRINT command inserts a page ejection when a form nears the end
of a page. Therefore, when the default PRINT command refers to a linage-file
report, it can change the report’s page spacing.
On Tru64 UNIX systems, to print a linage-file report, use this command:
% lpr report-file-specification
On OpenVMS Alpha systems, to print a linage-file report, use the /NOFEED
qualifier with the DCL PRINT command as follows:
$ PRINT report-file-specification/NOFEED
On OpenVMS Alpha systems, the LINAGE clause causes a Compaq COBOL
report file to be in print-file format. (See Chapter 6 for more information.)
When a WRITE statement positions the file to the top of the next logical page,
the device is positioned by line spacing rather than by page ejection or form feed.
For more information on printing your report, see Section 10.7.
Producing Printed Reports 1019