Spooler Programmer's Guide
Sample Perusal Process
Spooler Programmer’s Guide—522287-002
B-13
 ! Error handling
 CALL err(error^code);
 END
 ELSE
 BEGIN
 error^code := PRINTREADCOMMAND(message, ,,,,,,datafile);
 IF error^code <> 0 THEN
 BEGIN
 CALL err(error^code);
 ! Error handling
 END
 ELSE
 BEGIN
 CALL OPEN (datafile,datanum,%2000,1);
 IF <> THEN
 BEGIN
 ! Error handling
 CALL filerr(-1);
 END
 ELSE
 BEGIN
 error^code := PRINTSTART(jobbuff, message,datanum);
 IF error^code <> 0 THEN
 BEGIN
 CALL err(error^code);
 ! Error handling
 END
 ELSE list^job := current^job;
 END;
 END;
 END;
 END;
?page
! LIST performs the listing operation. It first decides whether the 
! correct job is open, then it decides whether a set of pages or lines
! should be printed, and then it lists the requested data.
PROC LIST (page, number, lines);
 INT page,
 number,
 lines;
 BEGIN
 INT error^code,
 current^page,
 I;
! If the job currently open does not match the current job, then
! call open^list^job to close the one job and open the other.
 IF list^job <> current^job THEN CALL open^list^job;
 IF page > 0 THEN
 BEGIN
 error^code := STRIPLINES(jobbuff, dline, 900, page);
 IF error^code <> 0 THEN
 BEGIN
 CALL err(error^code);
 ! Error handling
 END
 ELSE
 BEGIN
 error^code := PRINTINFO(jobbuff, , current^page);
 IF error^code <> 0 THEN
 BEGIN
 CALL err(error^code);
 ! Error handling










