COBOL Manual for TNS and TNS/R Programs
Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
30-8
Spooling Compiler Listings
Spooling Compiler Listings
To send your compiler listing to a spooler, specify a spooler collector and location for
your OUT file when you compile your HP COBOL program; for example:
COBOL85 /IN WHIZBANG, OUT $S.#WIZZ/;SYNTAX
The compiler uses level 3 spooling when the OUT file is a spooler collector (device
subtype 31).
Spooling Program Output
For its output, an HP COBOL program can use any of:
•
Level-1 Spooling
•
Level-2 Spooling
•
Level-3 Spooling
Level-1 Spooling
Level-1 spooling uses the spooler collector as a simple output file: you assign the
COBOL file name of the output file to a system name that is a spooler collector (with or
without a location name) and operate on the file with the HP COBOL statements
OPEN, WRITE, REWRITE, and CLOSE. The LINAGE clause and the ADVANCING
phrase of the WRITE statement work as expected. All attributes of the spooler job
except the location name assume their default values: single copy, priority 4, report
name set to group name followed by user name, and no form name.
Example 30-1. Level-1 Spooling
SELECT SPOOLER-FILE
ASSIGN TO "$S.#MYSTUF"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
...
FD SPOOLER-FILE
RECORD CONTAINS 80 TO 132 CHARACTERS
LABEL RECORDS ARE OMITTED.
01 SPOOLER-SHORT-LINE PIC X(80).
01 SPOOLER-LONG-LINE PIC X(132).
...
PROCEDURE DIVISION.
...
OPEN OUTPUT SPOOLER-FILE
...
WRITE SPOOLER-SHORT-LINE
...