Spooler Plus Programmer's Guide
Sample Print Process
Spooler Plus Programmer’s Guide—522293-003
A-11
 BEGIN
 CALL stop^job (device, 0);
 RETURN;
 END;
!-12001- end of copy found
 BEGIN
 header^index := dev.flags.<13>;
 error := 0;
 CALL SETMODE (dev^fnum, 28, 0);
 goto next^copy;
 END;
!-12002- data file is bad
 BEGIN
 CALL stop^job (device, error);
 END;
!-12003- CONTROL found
 BEGIN
! Issue CONTROL to IOP print process--issue only 
! forms control operations - any others are ignored.
 IF data^line <> 1 THEN
 wait^needed := 0 ! No IO so no need to wait
 ELSE
 BEGIN
 CALL CONTROL (dev^fnum, data^line, data^line[1]);
 IF <> THEN ! check CONTROL condition code
 BEGIN
! CONTROL was unsuccessful
 suspend := 1;
 suspended := 1;
 CALL FILEINFO (dev^fnum, error);
 msg^type := IF successful^op THEN
 dev^error^1
 ELSE
 dev^error^5;
 CALL tell^super ( msg^type, device,
 device^file^error + error);
 successful^op := 0;
 END
 ELSE
! CONTROL was successful
 successful^op := 1;
 END;
 END;
!-12004- SETMODE found
 BEGIN
! Issue SETMODE to IOP print process
 CALL SETMODE (dev^fnum, data^line, data^line[1],
 data^line[2]);
 IF <> THEN ! check SETMODE condition code
 BEGIN
! SETMODE was unsuccessful
 suspend := 1;
 suspended := 1;
 CALL FILEINFO (dev^fnum, error);
 msg^type := IF successful^op THEN
 dev^error^1
 ELSE
 dev^error^5;
 CALL tell^super ( msg^type, device,
 device^file^error + error);
 successful^op := 0;
 END
 ELSE
! SETMODE was successful
 BEGIN
 successful^op := 1;










