Spooler Plus Programmer's Guide
Spooler Procedure Calls
Spooler Plus Programmer’s Guide—522293-003
4-54
Obtaining the Spooler Statistics and Status
Obtaining the Status of the Spooler (Command Code 19)
To obtain the status of the spooler, set the command-code parameter of
SPOOLERSTATUS2 to 19, pass a 128-word status buffer to SPOOLERSTATUS2, and
set bit 15 of the scan-type parameter to 0. Because the file number specifies the
spooler with which SPOOLERSTATUS2 is communicating, none of the status buffer
fields needs to be filled. The following STRUCT shows the fields of the buffer:
STRUCT spooler^buffer;
BEGIN
INT state, ! spooler state:
! 1 = Active
! 2 = Warm
! 3 = Cold
! 4 = Drain
reserved; ! reserved for use by HP
STRUCT logfile; ! supervisor error log file
BEGIN
INT volume [0:3], ! $volume, blank-filled
subvolume [0:3], ! subvolume, blank-filled
filename [0:3]; ! file name, blank-filled
END;
INT last^error; ! last error recorded in log
! file
INT version; ! version number of Spooler Plus
END;
Obtaining the Status of Jobs Waiting to Print (Command
Codes 20, 21, and 22)
To obtain the status of a job on the ready list, set the command-code parameter of
SPOOLERSTATUS2 for the type of scan you want to perform (20, 21, or 22) and pass
a 128-word status buffer to SPOOLERSTATUS2. The following STRUCT shows the
fields of the buffer:
STRUCT job^queue^status;
BEGIN
INT state; ! job state:
! 1 = Open
! 2 = Ready
! 3 = Hold
! 4 = Printing
INT device^name [0:15]; ! name of device job is or
! will be printing on
! [0:3] = \system name
! [4:7] = $device name
! [8:11] = #subdevice
! [12:15] = (blank-filled)
INT sequence^number; ! device queue sequence
! number of job
INT number; ! job number
STRUCT location; ! location of job in
BEGIN ! internal form
STRING group [0:7], ! #group name, blank-filled
destination [0:7]; ! destination, blank-filled
END;
INT copies; ! number of copies to be printed