Spooler Programmer's Guide

Spooler Procedure Calls
Spooler Programmer’s Guide522287-002
4-58
Obtaining the Spooler Statistics and Status
SPOOLERSTATUS or a 128-word status buffer to SPOOLERSTATUS2. The following
STRUCT shows the fields of the buffer:
STRUCT font;
BEGIN
INT fontname [0:7]; ! font name
INT job; ! job associated with the font
END;
If you want the status of all fonts in the spooler subsystem, fill the font.fontname
field with blanks and pass a 1 as the SPOOLERSTATUS scan-type parameter. The
first call will return the status of the font whose name comes first alphabetically.
Continue calling SPOOLERSTATUS until it returns error %14006 (end of entries).
If you want the status of a particular font, fill the font.fontname field with the name
of the font and then call SPOOLERSTATUS2 with scan-type set to 0.
Obtaining the Status of a Batch (Command Code 14)
To obtain the status of a batch, set the command-code parameter of
SPOOLERSTATUS2 to 14 and pass a 128-word status buffer to SPOOLERSTATUS2.
The following STRUCT shows the fields of the buffer:
STRUCT batch;
BEGIN
INT batch^id, ! batch number
job, ! job number
batch^name [0:15], ! name of the batch
jobs^in^batch; ! number of jobs in batch
END;
If you want the status of a particular spooler batch job, set batch.batch^id to the
batch number of the spooler batch job whose status you want. Then call
SPOOLERSTATUS2 with scan-type set to 0. Note that batch.job returns with the
number of the first spooler job in the spooler batch job. For batch jobs created by
NetBatch, the first job is the user log file.
If you want the status of all spooler batch jobs in the spooler subsystem, set
batch.batch^id to 0 and pass 1 as the scan-type parameter. The first call returns
the status of the spooler batch job with the lowest batch number. Continue calling
SPOOLERSTATUS2 until it returns error %14006 (end of entries). Note that
batch.job returns with the number of the first spooler job in each batch job returned
in this manner.
If you want the status of all spooler jobs in a spooler batch job, set batch.batch^id
to the batch number of the spooler batch job whose spooler jobs you want. Set bit <0>
of batch.job to 1, and set bits <1:15> of batch.job to 0. Then call
SPOOLERSTATUS2 with scan-type set to 1. The first call will return the job number
of the first spooler job in the spooler batch job. Continue calling SPOOLERSTATUS2
to get each job number in the spooler batch job. These job numbers are not in
numerical sequence. They are in the order in which they were linked to the spooler
batch job.