Spooler Plus Programmer's Guide
Using the Spooler Interface Procedures
Spooler Plus Programmer’s Guide—522293-003
2-20
Spooling—Levels 1 and 2
 line [0:39],
 ! contains the line of data to spool
 length;
 ! contains the number of bytes to write from line
 ! Start the backup and check if this is the backup
 CALL stbackup;
 ! Open file to collector, and check for errors.
 CALL OPEN( collector, collectnum, flags, 0);
 IF <> THEN CALL error;
 ! CHECKOPEN the successful open to the collector
 ! and test for error.
 CALL CHECKOPEN( collector, collectnum, flags,0,,, err);
 IF <> THEN CALL cherror(err);
 ! Get a line of data and test for done.
 ! If done, fall through.
 WHILE getline(line, length) DO
 BEGIN
 ! CHECKPOINT stack (including line of data) and
 ! synchronization block
 err := CHECKPOINT(line, , collectnum);
 ! Write the line to the collector and check for errors
 CALL WRITE ( collectnum, line, length);
 IF <> THEN CALL error;
 END;
 ! Close the file to the collector
 CALL CLOSE(collectnum);
 IF <> THEN CALL error;
 ! Stop backup and stop primary
 CALL cherror(0);
 CALL STOP;
 END;
Example 2-5. Annotated Example of Level-1 Spooling From a NonStop Process 
Pair With a Zero Sync Depth
(page3of3)










