Spooler Programmer's Guide
Spooler Procedure Calls
Spooler Programmer’s Guide—522287-002
4-51
Obtaining the Spooler Statistics and Status
If data^file is nonblank, only jobs stored in the specified data file are returned.
When using a SPOOLERSTATUS2 scan-type of 1, if either bit 0 or bit 1 of number
is set to 1 by the caller, these bits must be restored between calls. The low-order bits
of number must not be allowed to change between calls. The easiest method to
ensure this does not occur is to logically OR these bits with number. When using a
scan-type of 1 with bit 1 of number, all fields except number must be reassigned.
SPOOLERSTATUS2 returns %14006 (end of entries) when all jobs have been
returned.
Obtaining the Status of a Location (Command Code 3)
To obtain the status of a location, set the command-code parameter of
SPOOLERSTATUS2 to 3 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 location;
BEGIN
STRUCT name; ! name of location
BEGIN
STRING group [0:7], ! #group name, blank-filled
destination [0:7]; ! destination, blank-filled
END;
INT flags, ! location flags
! (1=on, 0=off)
! flags.<8> = broadcast
device^name [0:15], ! device name
! name[0:3] = \system name*
! name[4:7] = $device name*
! name[8:11] = #subdev name*
! name[12:15] = (blank-filled)
fontname [0:7]; ! font associated with location
END; ! * field is blank-filled
If you want the status of all locations in the spooler subsystem, fill location.name
(both group and destination) with blanks and enter a 1 as the SPOOLERSTATUS2
scan-type parameter. The first call will return the status of the location whose name
comes first alphabetically. Continue calling SPOOLERSTATUS2 until it returns error
%14006 (end of entries).
When the group changes, you must make two calls to SPOOLERSTATUS2 in order to
get complete information. The first call returns the group number, with the destination
as blank; the next call returns all destinations within this group. In other words, the first
return you receive is not the first location for this group; it is the group description itself.
If you want the status of a particular location, fill location.name with the group name
and, as the destination, the name of the location whose status you want (both group
and destination must be blank-filled). Then call SPOOLERSTATUS2 with the scan-
type parameter set to 0.