Spooler Programmer's Guide
Spooler Procedure Calls
Spooler Programmer’s Guide—522287-002
4-55
Obtaining the Spooler Statistics and Status
INT copies,  ! number of copies to be printed
 pages,  ! number of pages in job 
 current^line,  ! reserved for use by HP 
 total^lines;  ! total number of lines in 
! the job 
STRING form^name [0:15];  ! job form name, blank-filled
INT owner^ID;  ! owner^ID.<0:7> = owner's group ID
! owner^ID.<8:15> = owner's user ID
END;
Obtaining the Status of Jobs in a Device Queue (Command 
Code 7)
To obtain the status of a job in a particular device queue, set the command-code 
parameter of SPOOLERSTATUS2 to 7 and the scan-type parameter to 1.
Put the name of the device whose queue you want to examine in the 
job^queue^status.device^name field (blank-filled), and set the 
sequence^number field to 0. The first call returns the job at the head of the device 
queue. Continue calling SPOOLERSTATUS2, but do not change the device^name or 
sequence^number fields. Each subsequent call returns the next job in the queue. 
When SPOOLERSTATUS2 returns %14006, the status of all jobs in the queue has 
been returned.
In addition to the lists of spooler components, the supervisor also keeps a ready list of 
all jobs in a device queue waiting to print. The ready list is composed of all device 
queues in the system. The end of one device queue links to the beginning of the next. 
The device queues are linked in alphabetical order according to the name of the 
device.
The device queue sequentially lists each job in the queue. The job at the front of the 
queue is assigned sequence number 1, the next job is sequence number 2, and so on. 
Sometimes the same job can appear in more than one queue. Each entry for the job in 
a device queue is called a job occurrence.
Figure 4-1 illustrates this data structure. The sequence number of each job is shown 
to the left of each job number. Note that Job 234 has a separate occurrence queued 
for each of the three devices. 










