Spooler Programmer's Guide
Using the Spooler Interface Procedures
Spooler Programmer’s Guide—522287-002
2-25
Spooling—Level 3
Spooling—Level 3
An application process spooling at level 3 writes data to the collector using the spooler 
interface procedures. SPOOLWRITE, SPOOLCONTROL, SPOOLCONTROLBUF, and 
SPOOLSETMODE do not actually write a line of data to the collector each time one of 
them is called. Instead, they put the data in the level-3-buffer you specified in an 
earlier call to SPOOLSTART.
At the point that data specified in a call to a SPOOLWRITE, SPOOLCONTROL, 
SPOOLCONTROLBUF, or SPOOLSETMODE procedure would cause the level-3-
buffer to overflow, the procedure checks to see whether bit 11 of the SPOOLSTART 
flags parameter has been set to 1. If that bit is 0, the procedure writes the buffer to 
the collector and begins refilling the buffer with the data line that would have 
overflowed the buffer.
If bit 11 of flags is 1, however, the procedure exits before writing the level-3-
buffer to the collector and returns a spooler error code value of %11000. This 
indicates to the application process that the level-3-buffer is about to be written to 
the collector and that a checkpoint should be performed. 
After checkpointing, you must use the same data again to call the procedure that 
returned the %11000. This time, that procedure writes the buffer to the collector and 
begins refilling the buffer with the data line.
When using the spooler interface procedures, you can perform spooling from a 
NonStop process pair with or without checkpointing. In fact, you do not even have to 
use the fault-tolerant bit in SPOOLSTART (bit 11 of the flags parameter), but this 
would lead to inefficient checkpointing. Only fault-tolerant programs that use bit 11 of 
flags are considered. The application must checkpoint the data stack, the lbuffer, the 
latest line of data to be written, and the synchronization block of the file to the collector.
Figure 2-1 shows a flow chart of SPOOLWRITE, SPOOLSETMODE, 
SPOOLCONTROL, and SPOOLCONTROLBUF procedures for handling a call that 
would overflow the level-3-buffer.










