COBOL Manual for TNS and TNS/R Programs
Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
30-7
Using a Spooler
Form Name
If a job must be printed on a specific form, give the job a form name. Each device
known to the spooler can have a form name.
If your installation prints invoices, you might specify INVOICE as the form name for a
report. When the time comes to print the invoices, the operator loads the proper paper
forms on the chosen device and sets the device’s form name to INVOICE. When both
the location and form name of a spooler job match the location and form name of the
device, the spooler prints the job. You probably cannot expect the operator to notice
that a job is waiting for a form name to be associated with a device. Your facility might
have a forms schedule for regularly scheduled jobs, but you would have to alert the
operator for other spooler jobs that need special forms.
A form name can have up to 16 characters.
A form name must not:
•
Start with a number or a space character
•
Contain any special characters or embedded blanks
The default form name is blank (that is, no form name).
When a device has a nonblank form name associated with it, the spooler routes only
jobs with the same form name to that device. When a device has no form name
associated with it, the spooler can route any job with no form name to it.
Using a Spooler
There are two contexts in which you, as an HP COBOL application programmer, use a
spooler: compilation and execution. When you compile an HP COBOL program and
produce a listing, it can go to the spooler. When you execute an HP COBOL program,
it can send output to the spooler. There are three levels of spooling. You interact with
the spooler through the PERUSE and SPOOLCOM processes.
Topics:
•
Spooling Compiler Listings
•
Spooling Program Output
•
Using PERUSE
•
Using SPOOLCOM