COBOL Manual for TNS/E Programs (H06.03+)

Printer and Spooler Output
HP COBOL Manual for TNS/E Programs520347-003
30-9
Spooling Program Output
The other parameters of the COBOL_SPECIAL_OPEN_ routine enable you can
specify:
Exclusion mode
Sync depth
Whether a page-eject precedes the first page printed
Location name
Form name
Report name
Number of copies
Page size
Flags that set the job priority and the attributes HOLD and HOLDAFTER
Owner
Maximum number of lines
Maximum number of pages
Whether to create a regular or code-129 spooler file
Whether a form feed is to be used to position the file at the top of a new page
rather than using spacing when LINAGE is specified for the file
An error return code
For details, see COBOL_SPECIAL_OPEN_.
The preferred way to apply a declarative to a file that is used for level-2 spooling is to
explicitly name the file in a USE AFTER EXCEPTION statement. All ordinary
HP COBOL file-manipulating statements then transfer control to the declarative if an
exception arises. The statement ENTER COBOL_SPECIAL_OPEN_ does not transfer
control if it encounters an exception, so include a GIVING phrase in the ENTER
statement and then test the file status code data item after the ENTER statement
executes.
Example 30-2. Level-2 Spooling (page1of2)
SELECT SPOOLER-FILE
ASSIGN TO "$S"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS SPOOLER-FILE-STAT.
...