Compaq COBOL AAQ2G1FTK User Manual
Page 353
Producing Printed Reports
10.9 Report Writer Examples
Example 10–7 (Cont.) Sample Program EX1007
TYPE DETAIL
LINE PLUS 2.
02 COLUMN 1
PIC X(15) SOURCE LAST-NAME.
02 COLUMN 17
PIC X(10) SOURCE FIRST-NAME.
02 COLUMN 28
PIC XX
SOURCE MIDDLE-INIT.
02 COLUMN 30
PIC X(20) SOURCE ADDRESS.
02 COLUMN 51
PIC X(20) SOURCE CITY.
02 COLUMN 72
PIC XX
SOURCE STATE.
02 COLUMN 75
PIC 99999 SOURCE ZIP.
02 COLUMN 81
PIC Z9
SOURCE INV-DAY.
02 COLUMN 83
PIC X
VALUE "-".
02 COLUMN 84
PIC 99
SOURCE INV-MO.
02 COLUMN 86
PIC X
VALUE "-".
02 COLUMN 87
PIC 9999
SOURCE INV-YR.
02 COLUMN 92
PIC 9(6)
SOURCE INVOICE-NUMBER.
02 COLUMN 99
PIC $$$,$$$,$$$.99-
SOURCE INVOICE-SALES.
02 DETAIL-COUNT PIC S9(10) SOURCE ONE-COUNT.
02 INV-AMOUNT
PIC S9(9)V99 SOURCE INVOICE-SALES.
NEXT GROUP IS PLUS 2.
02
LINE IS PLUS 2.
03
COLUMN
72
PIC X(41) VALUE ALL "*".
02
LINE IS PLUS 1.
03
COLUMN
20
PIC X(17) VALUE " TOTAL RECORDS: ".
03 IDC
COLUMN
40
PIC ZZZ,ZZZ,ZZ9 SUM ONE-COUNT.
03 IIA
COLUMN
99
PIC $$$,$$$,$$$.99- SUM INVOICE-SALES.
02
LINE IS PLUS 1.
03
COLUMN
72
PIC X(41) VALUE ALL "*".
01
FINAL-FOOTING TYPE IS CONTROL FOOTING FINAL
NEXT GROUP NEXT PAGE.
02
LINE IS PLUS 2.
03
COLUMN
72
PIC X(41) VALUE ALL "*".
03
COLUMN
14 PIC X(21) VALUE "GRAND TOTAL RECORDS: ".
03 FDC
COLUMN
40 PIC ZZZ,ZZZ,ZZ9 SUM IDC.
03
COLUMN
72 PIC X(22) VALUE " GRAND TOTAL INVOICES:".
03 FIA
COLUMN
95 PIC $,$$$,$$$,$$$.99- SUM IIA.
02
LINE IS PLUS 1.
03
COLUMN
72
PIC X(41) VALUE ALL "*".
01
REPORT-FOOTER TYPE IS REPORT FOOTING.
02
LINE 24
ON NEXT PAGE COLUMN
45
PIC X(31) VALUE ALL "*".
02
LINE 25.
03
COLUMN
45
PIC X VALUE "*".
03
COLUMN 75
PIC X VALUE "*".
02
LINE 26.
03
COLUMN
45
PIC X(31) VALUE "*
Customer Master File
*".
(continued on next page)
Producing Printed Reports 10–53