Spooler Plus Programmer's Guide
Spooler Procedure Calls
Spooler Plus Programmer’s Guide—522293-003
4-46
Considerations
status-buffer input, output
INT:ref:128
is a 128-word buffer where the status is returned. The format of the status buffer
depends on the particular command code.
Considerations
The following considerations apply to the use of the SPOOLERSTATUS2 procedure:
Before calling the SPOOLERSTATUS2 procedure, you must open a file to the
spooler supervisor. You must specify waited I/O.
If %14016 is returned, call SPOOLERSTATUS2 again.
Obtaining the Spooler Statistics and Status
The spooler supervisor maintains a separate list for each type of spooler component.
The lists of print processes, devices, collectors, and locations are in alphabetical order.
The list of jobs is in ascending numerical order by job number. The
SPOOLERSTATUS2 procedure allows you to access the elements of these lists
sequentially or individually.
Listed below are the spooler components in command-code order, where command-
code is a parameter of SPOOLERSTATUS2 as described in Table 4-11. For each
type of component, you will find the STRUCTs that determine the format of the
status-buffer where the status is returned.
Obtaining the Status of a Device (Command Code 1)
To obtain the status of a device, set the command-code parameter of
SPOOLERSTATUS2 to 1 and pass a 128-word status buffer to SPOOLERSTATUS2.
The following STRUCT shows the fields of the buffer:
STRUCT device;
BEGIN
INT name [0:15], ! $device name
! name[0:3] = \system name
! name[4:7] = $device name
! name[8:11] = #subdevice
! name[12:15] = (blank-filled)
state, ! 1 = device waiting
! 2 = device busy
! 3 = device suspended
! 4 = device error (deverror)
! 5 = device offline