Spooler Plus Programmer's Guide
Spooler Procedure Calls
Spooler Plus Programmer’s Guide—522293-003
4-50
Obtaining the Spooler Statistics and Status
END;
STRING collector^process^name [0:5]; 
! process name of collector 
! used to create this job 
INT (32) units^allocated;  ! number of units allocated 
! by collector to the job 
INT gmom^jobid; ! job id of GMOM
INT (32) max^lines;  ! maximum number of lines 
! allocated to the job 
INT (32) max^pages;  ! maximum number of pages 
! allocated to the job 
INT batch^name [0:15],  ! batch name that includes 
! this job 
 batch^id;  ! batch number
INT gmom^crtpid [0:3] ! crtpid of Netbatch monitor
END;
If you want the status of all jobs in the spooler subsystem, set the 
job^buffer.number field to 0 and set bit 15 to 1 in the scan-type parameter. The 
first call will return the status of the job with the lowest job number. Continue calling 
SPOOLERSTATUS2 until it returns error %14006 (end of entries).
If you want the status of jobs belonging to a specific owner ID, set bit 0 of the scan-
type parameterto 1, set job^buffer.owner^ID to the access ID of the person 
whose jobs you want returned, and set bit 15 to 1 in the scan-type parameter. Note 
that SPOOLERSTATUS2 can return (without any error code) jobs that belong to other 
users (because the supervisor limits its search to 32 jobs and can return a job number 
even if the owner ID does not match). Your program should examine the returned 
buffer to verify that the owner is correct. If it is not, reissue the request and continue.
If you want the status of a particular job, set job^buffer.number to the job number 
of the job whose status you want. Then call SPOOLERSTATUS2 with scan-type bit 
15 set to 0.
If you want the status of only certain jobs in the spooler subsystem, set bit 1 of the 
scan-type parameter to 1 and set bit 15 to 1.  SPOOLERSTATUS2 returns error 
%14016 (request in progress) if the supervisor is unable to find a job that meets the 
qualifications after searching 32 jobs. Do not use the contents of the returned buffer. 
Instead, reassign the buffer and call SPOOLERSTATUS2 until %14006 (end of entries) 
is returned. SPOOLERSTATUS2 returns only the jobs that meet the following criteria:
If state is not equal to 0, only jobs in the specified state are returned.
If location.group is nonblank, only jobs with the specified group and location 
are returned.
If location.destination is nonblank, only jobs with the specified destination 
are returned.
If form^name is nonblank, only jobs with the same form^name are returned.
If report^name is nonblank, only jobs with the specified report name are 
returned.










