Spooler Plus Programmer's Guide
Spooler Procedure Calls
Spooler Plus Programmer’s Guide—522293-003
4-59
Obtaining the Spooler Statistics and Status
Obtaining High-Level Spooler Statistics (Command Code 24)
To obtain high-level spooler statistics, set the command-code parameter of 
SPOOLERSTATUS2 to 24 and pass a 128-word status buffer to SPOOLERSTATUS2. 
The following STRUCT shows the fields of the buffer:
STRUCT spool^stats;
BEGIN !
 INT num^users; !number of concurrent openers
 INT recv^count; !number of recv queue entries
 INT num^jobs^total; !number of jobs collected
 INT max^jobs^total; !maximum number of jobs collected
 INT num^batch^jobs; !number of batch jobs
 INT max^batch^jobs; !maximum of batch jobs
 INT num^jobs^open; !number of open jobs
 INT num^jobs^printing; !number of jobs printing
 INT (32) num^jobs^collected; !number of jobs collected
 INT (32) num^jobs^printed; !number of jobs printed
 INT (32) dev^queue^nodes; !number of used dev nodes
 INT num^locs; !number of locations
 INT max^locs; !maximum of locations
 INT num^devs; !number of devices
 INT max^devs; !maximum of devices
 INT num^cols; !number of collectors
 INT max^cols; !maximum of collectors
 INT num^prts; !number of printers
 INT max^prts; !maximum of printers
 INT num^fnts; !number of font jobs
 INT max^fnts; !maximum of font jobs
END;
Obtaining Collector LISTOPENS (Command Code 25)
To obtain a list of the jobs that a specified collector currently has open, along with the 
processor and process identification number (PIN) of the processes that are spooling 
those jobs, set the command-code parameter of SPOOLERSTATUS2 to 25 and pass 
a 128-word status buffer to SPOOLERSTATUS2. The following STRUCT shows the 
fields in the buffer:
STRUCT sstatus^listopens; !
BEGIN !
 INT collector[0:2]; !input: collector process name
 INT entry^offset; !input/output: entry number requested
 INT numitems; !number of OPENDATA items returned
 INT status; !status returned from collector
 STRUCT opendata [0:18]; !table of returned LISTOPENS data
 BEGIN
 INT jobid; !job number
 INT procname[0:2]; !process with job open
 INT cpu; !processor
 INT pin; !process identification number
 END;
END;
Set the collector field to the name of the collector for the LISTOPENS information 
needed and set the entry^offset field to 0. The call SPOOLERSTATUS2 with bit 15 
of the scan-type parameter set to 1. The numitems field returned to the status 
buffer indicates how many valid occurrences of items exist in the opendata structure.










