Printing The Conventional Report; A Conventional File Report Example; Page Advancing And Line Skipping - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

10.5.4 Printing the Conventional Report

When you are ready to print your report, you must ensure that your system's line
printer can accommodate the page size or form of your report. If the printer uses
a different page size or form, contact your system manager. The system manager
can change the page or form size to accommodate your report.
Section 10.7 describes the different modes for printing a report.

10.5.5 A Conventional File Report Example

Example 10–3 shows a Compaq COBOL program that produces two reports from
the same input file.
Example 10–3 Page Advancing and Line Skipping
IDENTIFICATION DIVISION.
PROGRAM-ID. REP01.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE
SELECT FORM1-REPORT ASSIGN TO "FORM1.DAT".
SELECT FORM2-REPORT ASSIGN TO "FORM2.DAT".
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECORD.
02 I-NAME.
02 I-ADDRESS.
FD FORM1-REPORT.
01 FORM1-PRINT-LINE
FD FORM2-REPORT.
01 FORM2-PRINT-LINE
WORKING-STORAGE SECTION.
01 END-OF-FILE
01 MAX-LINES-ON-FORM2
01 FORM2-LINE-COUNTER
01 PAGE-NO
01 FORM1-LINE-3.
02
02 FORM1-LAST
01 FORM1-LINE-13.
02
02 FORM1-NAME
10.5 Programming a Conventional File Report
ASSIGN TO "REPIN.DAT".
03 I-FIRST
03 I-MID
03 I-LAST
03 I-STREET
03 I-CITY
03 I-STATE
03 I-ZIP
Producing Printed Reports
PIC X(10).
PIC X.
PIC X(15).
PIC X(20).
PIC X(15).
PIC XX.
PIC 99999.
PIC X(80).
PIC X(80).
PIC X
VALUE SPACE.
PIC 99
VALUE 55.
PIC 99
VALUE 00.
PIC 99999 VALUE 0.
PIC X(9)
VALUE SPACES.
PIC X(15).
PIC X(4)
VALUE SPACES.
PIC X(26).
(continued on next page)
Producing Printed Reports 10–9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Table of Contents