Spooler Plus Programmer's Guide

Spooler Procedure Calls
Spooler Plus Programmers Guide522293-003
4-49
Obtaining the Spooler Statistics and Status
The values that can be returned for the field device.devflagx.<1> are as follows:
All other bits in devflagx are reserved for use by the spooler.
Obtaining the Status of a Job (Command Code 17)
To obtain the status of a job, set the command-code parameter of
SPOOLERSTATUS2 to 17 and pass a 128-word status buffer to SPOOLERSTATUS2.
The following STRUCT shows the fields of the buffer:
STRUCT job^buffer;
BEGIN
INT number, ! job number
! if number.<0> = 0, then
! SPOOLERSTATUS[2] returns
! the status of all jobs
! in the spooler subsystem.
state; ! 1 = Open
! 2 = Ready
! 3 = Hold
! 4 = Printing
STRUCT location; ! location of job in
BEGIN ! internal form
STRING group [0:7], ! #group name, blank-filled
destination [0:7]; ! destination, blank-filled
END;
STRING form^name [0:15], ! job form name, blank-filled
report^name [0:15]; ! job report name, blank-filled
INT flags, ! device flags (0=off, 1=on)
! flags.<6> = Abnormal close
! (print process failed to
! call SPOOLEND prior to
! closing the file to the
! collector)
! flags.<9> = Hold
! flags.<10> = Holdafter
! flags.<13:15> = Selection
! priority
page^size, ! number of lines per page
owner^ID, ! owner^ID.<0:7> = owner's group ID
! owner^ID.<8:15> = owner's user ID
copies; ! number of copies to be printed
INT (32) pages; ! total number of pages in job
INT (32) lines; ! total number of lines in job
INT time^opened [0:2], ! time opened (48-bit timestamp)
time^closed [0:2]; ! time closed (48-bit timestamp)
STRUCT data^file; ! name of file containing the job
BEGIN
INT volume [0:3], ! $volume, blank-filled
subvolume [0:3], ! subvolume, blank-filled
filename [0:3]; ! file name, blank-filled
0 specifies that the device is not in pretranslate
mode.
1 specifies that the device is in pretranslate mode.