Spooler Plus Programmer's Guide
Sample Print Process
Spooler Plus Programmer’s Guide—522293-003
A-16
! printing a job, the spooler supervisor is notified that
! the stop job command is invalid.
!
! If the print process is currently printing a job, two
! CANCEL requests are issued to cancel any outstanding
! requests. The second request is most likely not needed;
! it is added as extra insurance.
!
! Control is passed to the procedure STOP^JOB to complete
! the tasks of stopping the current job.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC req^stop^job (device);
INT .device;
BEGIN
!---Beginning of code--------------------------------------------------
IF NOT busy^flag THEN
CALL tell^super (invalid^operation, device, no^job^printing)
ELSE
BEGIN
CALL CANCEL (dev^fnum);
CALL CANCEL (dev^fnum);
CALL stop^job (device, 0);
END;
RETURN;
END;
! *===================================================================*
! CONTROL NUMBER = 4: RESUME JOB
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: RESUME^JOB
! parameters: DEVICE - name of device where the job is to be printed
! description: This procedure services the spooler supervisor command
! to resume printing a job that had previously been
! suspended. If the current print job is not in a
! suspended state, the spooler supervisor is notified
! that the resume job command is invalid.
!
! When "suspended" flag is set to true, printing will
! resume with the record whose write previously failed.
! Otherwise, printing will resume with the next
! sequential record.
!
! Control is passed to the procedure READ^AND^PRINT, where
! the job resumes printing.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC resume^job (device);
INT .device;
BEGIN
INT error,
next^line := 0;
!---Beginning of code--------------------------------------------------
IF NOT suspend THEN
CALL tell^super (invalid^operation, device, no^job^printing)
ELSE
BEGIN
IF suspended THEN
next^line := -1;
suspend := 0;