COBOL Manual for TNS and TNS/R Programs
Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
30-5
Jobs
Suppose your installation has 12 printers, of which 4 are stocked with narrow paper.
Three of them are at the other end of the building (in room 145), and one is near your
work place (in room 301). Suppose your spooler designates this group of printers as
NARROW, and within that group designates the printers as RM145A, RM145B,
RM145C, and RM301. If you do not care which narrow-paper printer your report is
printed on, you can assign the output file to $S.#NARROW. The spooler directs the job
to whichever of the four printers could finish it first. If you want the job printed on the
nearby printer, assign the output file to $S.#NARROW.RM301.
There are two ways that your system manager can configure the spooler to print jobs
that have only a group name but no destination name specified:
•
On the printer that can finish the job first
•
On all printers in the group
The latter configuration is called broadcast mode.
If you specify a location that is unknown to the spooler, your job sits in the spooler until
such a location is made known to the spooler or you or a system operator changes the
job’s location with PERUSE or SPOOLCOM.
You can send the job to a fictitious location and use PERUSE to examine the contents
of a report before it is printed. If there is any problem with the report, you can delete it
from the spooler, fix the program that produced the report, and re-create the report.
If you do not specify a location, the spooler uses the location #DEFAULT. Each
installation determines for itself the identity of the device or devices that compose the
default group.
State
A job is always in one of four states:
If the job is in PRINT state, the spooler stops printing the job as soon as you request
that the job be put into the HOLD state.
You can put a job into the HOLD state with PERUSE or SPOOLCOM. PERUSE has a
HOLD command; SPOOLCOM has a JOB command with a HOLD subcommand.
By default, the spooler deletes a job as soon as it has printed it. If you want the spooler
to put the job into the HOLD state after printing it instead, use the PERUSE command
HOLDAFTER or the SPOOLCOM command JOB with the subcommand HOLDAFTER.
You can issue the HOLDAFTER command for a job in any state.
State Meaning
OPEN A process is writing to the collector.
READY The originating process has closed its file and the job is ready to be printed, but
the device on which it is to print is not currently available or its location is not
associated with a device.
PRINT The job is being printed on the device associated with the job’s location.
HOLD The job is awaiting disposition.