Spooler Plus Programmer's Guide
Spooler Procedure Calls
Spooler Plus Programmer’s Guide—522293-003
4-53
Obtaining the Spooler Statistics and Status
Obtaining the Status of a Print Process (Command Code 5)
To obtain the status of a print process, set the command-code parameter of 
SPOOLERSTATUS2 to 5 and pass a 128-word status buffer to SPOOLERSTATUS2 
The following STRUCT shows the fields of the buffer: 
STRUCT print;
BEGIN 
 STRING process^name [0:5];  ! print process name, 
  ! blank-filled 
 INT state,  ! print process state: 
! 1 = Active 
! 2 = Dormant 
! 3 = Procerror 
! 4 = Drain 
 flags,  ! print process flags
! (1 = yes, 0 = no) 
! flags.<14> = Associate 
! print process 
! flags.<15> = Debug mode 
 last^error;  ! last error logged on 
! print process 
STRUCT program^file;  ! program file of print process
BEGIN 
 INT volume [0:3],  ! $volume, blank-filled 
 subvolume [0:3],  ! subvolume, blank-filled 
 filename [0:3];  ! file name, blank-filled 
END;
INT cpus,  ! CPUs executing print 
! process program 
! cpus.<0:7> = primary 
! cpus.<8:15> = backup 
 priority,  ! execution priority of 
! the print process 
 parameter;  ! parameter from Spoolcom 
! command 
END;
If you want the status of all print processes in the spooler subsystem, fill the 
print.process^name field with blanks and set bit 15 of the scan-type parameter 
to 1.The first call will return the status of the print process whose name comes first 
alphabetically. Continue calling SPOOLERSTATUS2 until it returns error %14006 (end 
of entries).
If you want the status of a particular print process, fill the print.process^name field 
with the name of the print process whose status you want (fill the right side of the field 
with blanks). Then call SPOOLERSTATUS2 with bit 15 of the scan-type parameter 
set to 0.










