Spooler Plus Programmer's Guide
Using the Spooler Interface Procedures
Spooler Plus Programmer’s Guide—522293-003
2-33
Spooling—Level 3
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 #LLP LLP ",
! contains the file name of the collector and
! location in internal format
collectnum,
! contains the file number returned from OPEN
location [0:7] := "#LPRMT3 ",
! contains the new location for the job
flags := %B0100100000000000,
! contains the bit pattern for the flags parameter to OPEN
! and CHECKOPEN
line [0:39],
! contains the line of data to spool
length,
! contains the number of bytes to write from line
syncount := 0,
! contains the count of synchronized writes to the collector
err,
! contains the CHECKOPEN back error or the CHECKPOINT
! status word
sperrnum,
! receives spooler error code
.buffer[0:511],
! this is the level-3 buffer
bytecount;
!contains the number of bytes already written to the buffer
! Open file to collector, and check for errors.
CALL OPEN( collector, collectnum, flags, 5);
IF <> THEN CALL error;
! CHECKOPEN successful open of the collector
CALL CHECKOPEN(collector,collectnum, flags, 5,,, err);
! Check for a CHECKOPEN error
IF <> THEN CALL cherror(err);
Example 2-8. Annotated Example of Level-3 Spooling From a NonStop Process
Pair With a Nonzero Sync Depth
(page 3 of 5)