Spooler Programmer's Guide

Spooler Procedure Calls
Spooler Programmer’s Guide522287-002
4-46
Considerations
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.
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 either a 64-word status buffer to
SPOOLERSTATUS or 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
! 6 = print process error
! (procerror)
last^error, ! the last spooler error code
! recorded on the device
flags; ! device flags (0=off, 1=on)
! flags. <0> = Devreset
! flags.<1:2> = Startff
00 = OFF
01 = ON
10 = OFF !
! flags.<3> = Endff
! flags.<4:7> = DEVTYPE
0001 = SNAX LU1
0010 = SNAX LU3
0111 = 7 SUB-TYPE FOR 5515,