Spooler Plus Programmer's Guide
Sample Print Process
Spooler Plus Programmer’s Guide—522293-003
A-13
 error)
 ELSE
 CALL tell^super (end^job, device, error);
 RETURN;
 END;
! *===================================================================*
PROC init^job;
 BEGIN
!---Beginning of code--------------------------------------------------
 data^file^fnum := 0;
 busy^flag := 0;
 suspend := 0;
 suspended := 0;
 msg^type := 0;
 successful^op := 0;
 end^of^job^flag := 0;
 header^index := 0;
 END;
! *===================================================================*
! CONTROL NUMBER = 0: OPEN DEVICE
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: OPEN^DEV
! parameters: DEVICE - name of device to be opened
! description: This procedure services the spooler supervisor command
! to open a device (exclusive and nowaited). If the open
! is unsuccessful, a PRINTSTATUS message, type 3 (unable
! to open device), will be sent to the spooler supervisor.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC open^dev (device);
 INT .device;
 BEGIN
 INT exclusive^and^nowait := %21,
 error;
!---Beginning of code--------------------------------------------------
 error := openfile (device, dev^fnum, exclusive^and^nowait);
 IF error THEN
 BEGIN
 CALL tell^super (cant^open^device, device, device^file^error +
 error);
 END;
 RETURN;
 END;
! *===================================================================*
! CONTROL NUMBER = 1: CLOSE DEVICE
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: CLOSE^DEV
! parameters: DEVICE - name of device to be closed
! description: This procedure services the spooler supervisor command
! to close a device. If device is currently printing a
! job, the spooler supervisor is notified that the close
! command is invalid.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -










