Spooler Programmer's Guide

Sample Print Process
Spooler Programmer’s Guide522287-002
A-17
suspended := 0;
CALL read^and^print (next^line, device);
END;
END;
! *===================================================================*
! CONTROL NUMBER = 5: SUSPEND JOB
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: SUSPEND^JOB
! parameters: DEVICE - name of device where the job is currently
! printing.
! description: This procedure services the spooler supervisor command
! to suspend the printing of the current job. If the
! print process is not currently printing a job, the
! spooler supervisor is notified that the suspend job
! command is invalid.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC suspend^job (device);
INT .device;
BEGIN
!---Beginning of code--------------------------------------------------
IF NOT busy^flag THEN
CALL tell^super (invalid^operation, device, no^job^printing)
ELSE
suspend := 1;
RETURN;
END;
! *===================================================================*
! CONTROL NUMBER = 6: ALIGN FORM
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: ALIGN^FORM
! parameters: DEVICE - name of device where the alignment template is
! to be printed.
! description: This procedure services the spooler supervisor command
! to print the alignment template. If the print process
! is currently printing a job, the spooler supervisor is
! notified that the form alignment command is invalid.
!
! The write of the form alignment template can fail in
! two areas: at the Guardian 90 procedure WRITE call (in
! the procedure WRITEFILE) and at the Guardian 90
! procedure AWAITIO call (in the procedure MAIN^LOOP). The
! spooler supervisor will be notified if the form
! alignment template write was unsuccessful.
!
! When the form alignment template write is successful,
! end-of-job status is sent to the spooler supervisor
! through a call to the procedure STOP^JOB in the
! procedure MAIN^LOOP after the AWAITIO completion.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC align^form (device);
INT .device;
BEGIN
INT error;
!---Beginning of code--------------------------------------------------