Spooler Programmer's Guide
Using the Spooler Print Procedures, Print
Processes, and Perusal Processes
Spooler Programmer’s Guide—522287-002
3-4
Print Process Startup Message
3. Communicate with the spooler supervisor (using PRINTCOMPLETE,
PRINTSTATUS, and PRINTREADCOMMAND).
Print Process Startup Message
A print process not currently running is started by the spooler supervisor for one of two
reasons:
A job is ready to be printed on a device controlled by the print process.
A device controlled by the print process has been declared exclusive.
Immediately after starting a print process, the supervisor sends the print process a
Startup message, passing it the process name of the supervisor.
The format of the Startup message from the supervisor is shown in Table 3-2.
The first action taken by a print process should be to read its Startup message to
obtain the name of the supervisor, its backup processor, and its print process device
parameter.
Retrieving and Printing Spooled Data
The sequence of events involved in retrieving and printing a job is as follows:
1. Open the spooler supervisor with nowait I/O, call PRINTINIT to format a print
control buffer, and call AWAITIO[X] to wait for a message from the supervisor. Call
PRINTCOMPLETE to get the print-control-buffer from the supervisor.
2. Call PRINTREADCOMMAND to interpret the information contained in the
supervisor print-control-buffer. PRINTREADCOMMAND returns the name
of the data file, the job route and attributes, and the name of the device on which
the job is to be printed.
Table 3-2. Startup Message From the Spooler Supervisor
Word Byte Contents
[0] [0:1] -1 (all bits on).
[1:20] [2:41] ASCII blanks.
[21:32] [42:65] Process name of supervisor, blank-filled. This can be passed
by the print process directly to the OPEN procedure.
[33] [66:67] Backup processor number, in ASCII, specified in the Spoolcom
command PRINT BACKUP. If no backup was specified, this
word contains -1 in ASCII (that is, %026461).
[34 left byte] [68] ASCII comma (,).
[34 right byte:
37 left byte]
[69:74] Print process parameter; field contains six ASCII characters
from the Spoolcom command PRINT PARM.
[37 right byte] [75] ASCII null (0).