Spooler Plus Programmer's Guide

Using the Spooler Interface Procedures
Spooler Plus Programmers Guide522293-003
2-3
Opening a File to a Collector
A buffer allocated above the data stack that is limited to 500 bytes. This
buffer is indicated by the level-3-buff parameter.
A buffer allocated in an extended data segment. Extended data segments
can be much larger than 512 bytes This buffer is indicated by the
extended-level-3-buff parameter. Extended data segments are
discussed in the Guardian Programmer’s Guide.
Use either the level-3-buff or extended-level-3-buff, but not
both. The buffer is specified in the SPOOLSTART procedure call and must
be used in all subsequent spooler interface procedure calls.
A program can spool data for several jobs concurrently, but a separate file must be
open to a collector for each job. A single application can spool up to 1024 jobs to each
collector.
Jobs spooled concurrently can be spooled at different levels. For example, an
application might open three files to the collector and send it data for three separate
jobs, spooling one job at each level. However, one job cannot be spooled at two
different levels at the same time (in other words, you cannot use both the Guardian file-
system WRITE[X] procedure and the SPOOLWRITE procedure on the same job).
Opening a File to a Collector
Before a program can send data to the spooler, it must have a file open to a collector.
This is accomplished by using the Guardian file-system OPEN procedure or the
FILE_OPEN_ procedure. The program must open the collector with shared access.
If an application is spooling at level 1, the file can be opened with either waited or
nowait input/output (I/O). However, if level-2 or level-3 spooling will be performed, you
must open the file to the collector with waited I/O.
To open a collector, the program must specify the collector and location for the job as
follows:
A call to the OPEN procedure must provide the collector name and location for the
job in 12-word internal format. The format is
Words[0:3] contain the $collector-name, blank filled.
Words[4:7] contain the #group-name, blank filled.
Words[8:11] contain the destination-name, blank filled.
The FILE_OPEN_ procedure provides extended features not available from the
OPEN procedure. On a call to FILE_OPEN_ , you must provide a variable-length
Note. The collector cannot accept more than 1024 jobs simultaneously. Thus, if there is more than one
process spooling to the same collector at the same time, the actual limit for one particular process might
be lower than 1024.