Spooler Programmer's Guide

Spooler Procedure Calls
Spooler Programmer’s Guide522287-002
4-49
Obtaining the Spooler Statistics and Status
fields of the following STRUCT support spooler batch jobs and require the larger status
buffer with SPOOLERSTATUS2. The following STRUCT shows the fields of the buffer:
STRUCT job^buffer;
BEGIN
INT number, ! job number
! if number.<0> = 0, then
! SPOOLERSTATUS2 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
pages, ! total number of pages in job
lines, ! total number of lines in job
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
END;
STRING collector^process^name [0:5];
! process name of collector
! used to create this job
INT units^allocated; ! number of units allocated
! by collector to the job
INT jobid; ! job id for this job
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