Spooler Programmer's Guide

Using the Spooler Print Procedures, Print
Processes, and Perusal Processes
Spooler Programmer’s Guide522287-002
3-7
PRINTREAD Errors
If the print process encounters subsequent errors on the same device without an
intervening successful operation, the print process should specify a msg-type of 1
and pass the error number in the error parameter.
The print process, however, continues printing other jobs on other devices.
For example, following a series of successful I/O operations, a print process receives
an error 102 (paper out) from one of the devices it controls. The print process calls
PRINTSTATUS with msg-type equals 5 and error equals 102. The print process
suspends the job that was printing on that device. Later, the print process receives a
“resume job” message from the supervisor. The print process attempts to resume the
job on the specified device, but receives an error 100 (device not ready) on the first I/O
operation. This time, the print process calls PRINTSTATUS with a msg-type of 1 and
an error of 100.
The print process suspends the job on which the error occurred. A suspended job is
resumed when the print process receives a “resume job” message from the supervisor.
If the error was caused by the job data (Guardian file-system CONTROL and
SETMODE operations), the error could be repeated several times.
PRINTREAD Errors
Most errors returned by PRINTREAD cause an abnormal job termination when passed
to PRINTSTATUS. Error %12001, however, simply indicates the end of a copy.
Errors %12000 and %12002 cause the spooler supervisor to delete the job. For
example, a print process calls PRINTREAD to get the next line of data for a job, and
PRINTREAD returns error %12002, invalid data file. The print process terminates the
job by closing the data file and permanently suspending activity on the job. In a call to
PRINTSTATUS, the print process passes msg-type 2 (end of job) to the supervisor,
along with the error (%12002) and the name of the device on which the job was
printing. The supervisor logs the abnormal termination and the error number and
purges the job. Refer to Appendix C, Spooler-Related Errors
, for a list of print
procedure error codes.
Errors %12003, %12004, and %12005 signify that the caller should call the appropriate
file-system operation (CONTROL, SETMODE, or CONTROLBUF).
All other PRINTREAD errors put the job on hold.
Note. A print process can elect to perform its own error checking; for example, it could retry an
operation that returned “device not ready” several times on its own before informing the
supervisor.