Producing Printed Reports
10.7 Modes for Printing Reports
•
You tie up the printer for as long as your job runs. If your program does
computations and runs for a long time, you could significantly reduce your
installation’s pages-printed-per-day production schedule.
•
You do not have a backup report file in the event of power failure or other
unforeseen circumstances. Therefore, if your job fails, you must begin again.
10.7.2 Spooling to a Mass Storage Device
To spool your report to a mass storage device (such as a disk or magnetic tape)
for later printing, your Compaq COBOL program must include a file specification.
For example, to spool JAN28P.DAT you would include the following code in your
program:
SELECT REPORT-FILE ASSIGN TO "USER1$:JAN28P".
(OpenVMS)
SELECT REPORT-FILE ASSIGN TO "/usr1$/JAN28P".
(Tru64 UNIX)
Spooling to a mass storage device has the following advantages:
•
You can run your job at any time regardless of other printer activity and
printer status.
•
Your application program does not make immediate resource demands on the
printer.
•
You can schedule the printing based on production and shop requirements,
and print the file according to your priority needs.
•
You optimize use of the printer. Spooling results in printing the maximum
number of lines per minute.
•
You have a backup of the file.
Spooling to a mass storage device has the following disadvantages:
•
You do not see immediate results.
•
It is difficult and expensive to input preprinted form numbers (for example,
check numbers) from your forms into your report file.
10.8 Programming a Report Writer Report
Report Writer allows you to describe the appearance of a report’s format. To do
this, you specify the Report Writer statements that describe the report’s contents
and control in the Report Section of the Data Division. These statements replace
many complex, detailed procedures that you would otherwise have to include in a
conventional or linage-file report.
The following sections explain how to produce a report with the Report Writer.
These sections describe how to do the following:
•
Use the REPORT clause in the FD statement of the FILE section.
•
Define the Report Section and the report description.
•
Define the Report Writer logical page.
•
Specify multiple reports.
•
Define and increment totals.
•
Process a Report Writer report.
•
Select a Report Writer type.
10–24 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: ......