Spooler Programmer's Guide
Spooler Procedure Calls
Spooler Programmer’s Guide—522287-002
4-54
Obtaining the Spooler Statistics and Status
Obtaining the Status of the Spooler (Command Code 6)
To obtain the status of the spooler, set the command-code parameter of 
SPOOLERSTATUS2 to 6, pass either a 64-word status buffer to SPOOLERSTATUS or 
a 128-word status buffer to SPOOLERSTATUS2, and set 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 
END;
Obtaining the Status of Jobs Waiting to Print (Command 
Codes 7, 8, and 9)
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 (7, 8, or 9) 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 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;










