Spooler Programmer's Guide
Using the Spooler Interface Procedures
Spooler Programmer’s Guide—522287-002
2-19
Spooling—Levels 1 and 2
?SOURCE $SYSTEM.SYSTEM.EXTDECS(OPEN, CLOSE, WRITE, STOP, 
?CHECKOPEN,CHECKPOINT)
PROC error;
 BEGIN
 CALL STOP;
 END;
PROC cherror (george);
 INT george;
 BEGIN
 CALL STOP;
 END;
PROC stbackup; 
 BEGIN 
 counter := counter;
 END;
INT PROC getline( line, length);
 INT .line,
 .length;
 BEGIN
 int temp, done;
 temp :=0;
 temp := counter.<13:15> ;
 temp := temp * 5;
 line [0] ':=' " ";
 line [1] ':=' line[0] for 39;
 line [temp] ':=' "0123456789";
 length := 80;
 IF counter > 120 THEN done := 0 ELSE done := 1;
 counter := counter + 1;
 RETURN done;
 END;
?list
PROC root MAIN;
BEGIN
 ! Declarations
 INT collector [0:11] := "$S #LP3 LP3 ",
 ! contains the collector and location name in
 ! internal format
 collectnum,
 ! contains the collector's file number returned from open
 err,
 ! contains the CHECKOPEN back error or the CHECKPOINT status 
 ! word
 flags := %B0100100000000000,
 ! contains the bit pattern for the flags parameter to OPEN 
 ! and CHECKOPEN
Example 2-5. Annotated Example of Level-1 Spooling From a NonStop Process 
Pair With a Zero Sync Depth
(page2of3)










