Spooler Plus Programmer's Guide
Sample Print Process
Spooler Plus Programmer’s Guide—522293-003
A-19
 BEGIN
 CALL CANCEL (dev^fnum);
 header^index := 0;
 CALL read^and^print (skip^num, device);
 END;
 RETURN;
 END;
! *===================================================================*
! CONTROL NUMBER = 8: SKIP <skip^num> PAGES
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: SKIP^PAGE
! parameters: SKIP^NUM - number of pages to be skipped.
! DEVICE - name of device where job is printing.
! description: This procedure services the spooler supervisor command
! to skip a specific number of pages and resume printing.
! The spooler procedure PRINTINFO is called to fetch the
! current page number of the current print job. If
! PRINTINFO returns an error, the print process will
! terminate.
!
! The current page number plus the number of pages to
! be skipped is passed to the procedure SKIP^TO^PAGE,
! where printing will resume at the desired page (current
! page number + skip^num + 1).
!
! *** NOTE*** This sample print process does not issue an
! error message prior to calling the Guardian 90 procedure
! ABEND. When creating a print process, it would be best
! to issue an error message prior to abnormal termination.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROC skip^page (skip^num, device);
 INT skip^num,
 .device;
 BEGIN
 INT error,
 page;
!---Beginning of code--------------------------------------------------
 error := PRINTINFO (job^buffer, , page);
 IF error THEN
 CALL ABEND;
 page := page + skip^num;
 IF page < 0 THEN
 page := 0;
 header^index := 0;
 CALL skip^to^page (page, device);
 RETURN;
 END;
! *===================================================================*
! CONTROL NUMBER = 9: SEND STATUS
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! procedure name: SEND^STATUS
! parameters: DEVICE - name of device where job is printing.
! description: This procedure services the spooler supervisor command
! for status of the current print job.
!
! If there is no current print job, the spooler supervisor










