Spooler Plus Programmer's Guide
Sample Perusal Process
Spooler Plus Programmer’s Guide—522293-003
B-12
 line[0] := " ";
 line[1] ':=' line[0] FOR 79;
 IF job.number = current^job THEN line[1] := "J";
 CALL NUMOUT(line[2], job.number, 10, 4);
 CASE job.state OF
 BEGIN
 !0! ;
 !1! line[8] ':=' "OPEN";
 !2! line[8] ':=' "READY";
 !3! line[8] ':=' "HOLD";
 !4! line[8] ':=' "PRINT";
 END;
 CALL NUMOUT(line[15], job.pages, 10, 5);
 CALL NUMOUT(line[22], job.copies, 10, 5);
 temp := 0;
 temp := job.flags.<13:15>;
 CALL NUMOUT(line[30], temp, 10, 1);
 IF job.state = 1 and job.flags.<9> = 1 THEN
 line[35] := "B";
 IF job.flags.<10> = 1 THEN line[36] := "A";
 line[41] ':=' job.location.group FOR 16;
 line[57] ':=' job.report^name FOR 16;
 CALL WRITE (termnum, iline, 79);
 IF <> THEN CALL filerr(termnum);
 END;
 job.owner^id := CREATORACCESSID;
 job.number.<0> := 1;
 error^code := SPOOLERSTATUS(supernum, 2, 1, job);
 END;
 CALL WRITE( termnum, iline, 0);
 IF <> THEN CALL filerr(termnum);
END;
?page
! This procedure calls PRINTREAD and strips off all SETMODE,
! CONTROL, and CONTROLBUF lines. It then returns the data line.
INT PROC STRIPLINES(buff, line, count, page);
 INT .buff,
 .line,
 count,
 page;
 BEGIN
 INT err^code;
 err^code := PRINTREAD(buff, line, count, page);
 WHILE (err^code = %12003 OR
 err^code = %12004 OR
 err^code = %12005 ) DO
 err^code := PRINTREAD(buff, line, count,, 0);
 RETURN (err^code)
 END;
?page
! This procedure closes the job currently open for listing and opens
! a new job. It is called when the current job has been changed since 
! the last list command.
PROC open^list^job;
 BEGIN
 INT error^code;
 CALL CLOSE(datanum);
 error^code := SPOOLEREQUEST( supernum,current^job,message);
 IF error^code <> 0 THEN
 BEGIN
 ! Error handling
 CALL err(error^code);










