Spooler Programmer's Guide
Using the Spooler Interface Procedures
Spooler Programmer’s Guide—522287-002
2-35
Spooling—Level 3
 ! Write buffer to collector
 sperrnum := SPOOLWRITE(buffer, line, length, bytecount);
 IF sperrnum THEN CALL sperror(sperrnum);
 END
 ELSE CALL sperror(sperrnum);
 END;
 ! Call checkpoint before final write to collector by
 ! SPOOLEND
 err := CHECKPOINT(line, buffer, bytecount,,collectnum);
 IF err THEN CALL cherror(err);
 ! End this job and change the flag setting to
 ! flags
 ! cancel off
 ! hold on
 ! holdafter off
 ! NonStop bit off
 ! priority 4
 sperrnum := SPOOLEND(buffer, %B0000000001000100);
 IF sperrnum THEN CALL sperror(sperrnum);
 ! 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-8. Annotated Example of Level-3 Spooling From a NonStop Process 
Pair With a Nonzero Sync Depth
(page 5 of 5)










