Producing Printed Reports
10.9 Report Writer Examples
Example 10–10 (Cont.) Sample Program EX1010
02
LINE 59.
03
COLUMN 45
PIC X(16) VALUE "C O M P A N Y
".
03
COLUMN
62
PIC X(25) VALUE
"C O N F I D E N T I A L
".
02
LINE 60.
03
COLUMN 45
PIC X(16) VALUE "C O M P A N Y
".
03
COLUMN
62
PIC X(25) VALUE
"C O N F I D E N T I A L
".
PROCEDURE DIVISION.
DECLARATIVES.
BOR SECTION.
USE BEFORE REPORTING REPORT-HEADER.
EOR SECTION.
USE BEFORE REPORTING REPORT-FOOTER.
EOR-A.
DISPLAY "*** Created EX1010.LIS ***".
END DECLARATIVES.
MAIN SECTION.
000-DO-SORT.
SORT SORT-FILE ON ASCENDING KEY SORT-NAME
WITH DUPLICATES IN ORDER
USING CUSTOMER-FILE
GIVING SORTED-FILE.
000-START.
DISPLAY "*** EX1010 ***".
DISPLAY "Enter Current Date (YYYYMMDD) :".
ACCEPT UNEDITED-DATE.
OPEN INPUT
SORTED-FILE.
OPEN OUTPUT PRINTER-FILE.
INITIATE MASTER-LIST.
PERFORM 200-READ-MASTER UNTIL NAME = HIGH-VALUES.
100-END-OF-FILE.
TERMINATE MASTER-LIST.
CLOSE SORTED-FILE, PRINTER-FILE.
STOP RUN.
200-READ-MASTER.
READ SORTED-FILE AT END MOVE HIGH-VALUES TO NAME.
IF NAME NOT = HIGH-VALUES GENERATE MASTER-LIST.
10–80 Producing Printed Reports
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......