Compaq COBOL AAQ2G1FTK User Manual
Page 347
Producing Printed Reports
10.9 Report Writer Examples
Example 10–6 (Cont.) Sample Program EX1006
PIC X(4) VALUE "CITY".
03
COLUMN 71
PIC X VALUE "|".
03
COLUMN 72
PIC X(2) VALUE "ST".
03
COLUMN 74
PIC X VALUE "|".
03
COLUMN 81
PIC X VALUE "|".
03
COLUMN 83
PIC X(4) VALUE "DATE".
03
COLUMN 90
PIC X VALUE "|".
03
COLUMN 92
PIC X(6) VALUE "NUMBER".
03
COLUMN 98
PIC X VALUE "|".
PIC X(6) VALUE "AMOUNT".
03
COLUMN 112
PIC X VALUE "|".
02
LINE
11.
03
COLUMN 1
PIC X VALUE "+".
03
COLUMN 2
PIC X(110) VALUE ALL "-".
03
COLUMN 112
PIC X VALUE "+".
TYPE DETAIL
LINE PLUS 1.
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-
02 DETAIL-COUNT PIC S9(10) SOURCE ONE-COUNT.
02 INV-AMOUNT
PIC S9(9)V99 SOURCE INVOICE-SALES.
01
FINAL-FOOTING TYPE IS CONTROL FOOTING FINAL
LINE PLUS 5
NEXT GROUP NEXT PAGE.
02
COLUMN
20 PIC X(17) VALUE "TOTAL RECORDS: ".
02 FDC
COLUMN
40 PIC ZZZ,ZZZ,ZZ9 SUM ONE-COUNT.
02
COLUMN
75 PIC X(15) VALUE "TOTAL SALES: ".
02 FIA
COLUMN
95 PIC $$$,$$$,$$$,$$$.99- SUM INVOICE-SALES.
(continued on next page)
Producing Printed Reports 10–47