Spooler Programmer's Guide

Using the Spooler Interface Procedures
Spooler Programmer’s Guide522287-002
2-4
Summary of Spooling From an Application Program
string for the collector and location (as the filename input parameter) and the
length of the string.
The parameters required in the FILE_OPEN_ procedure call are
CALL FILE_OPEN_ (filename:length,filenum) ;
For example, if the filename parameter specifies the collector name and location
$S.#LP2, the length parameter must be 7. The system returns a value in
filenum.
All considerations of job routing described under Routing Structure on page 1-22 apply
to routes specified implicitly when using OPEN or FILE_OPEN_ to establish
communication with a collector.
$collector-name is required in the call to OPEN and $collector-name and
length are required in the call to FILE_OPEN_. If #group-name or destination-
name is filled with blanks in a call to OPEN or is not present in a call to FILE_OPEN,
then the job will be assigned a location according to the rules for default routing.
In level-2 and level-3 spooling, you can change the job location in the call to
SPOOLSTART.
Summary of Spooling From an Application Program
The following points summarize spooling from an application program:
All three spooling levels have in common the requirement that the application must
have a file open to a collector before spooling can begin.
An application can spool data from several jobs concurrently. You must open a
separate file to a collector for each job.
The application process can use different levels of spooling to the same collector
at the same time. However, the levels cannot be combined with one another to
spool data for the same job.
Level-1 spooling does not involve any of the interface procedures. Jobs spooled in
this manner are assigned the default job attributes.
Level-2 spooling is the same as level 1, except that you can specify job attributes
using SPOOLSTART.
Level-3 spooling requires the use of the spooler interface procedures:
SPOOLSTART, SPOOLJOBNUM, SPOOLWRITE, SPOOLEND,
SPOOLCONTROL, SPOOLCONTROLBUF, and SPOOLSETMODE. These allow
a more efficient data transfer than is possible at levels 1 or 2.
Note. If the filename input parameter is not fully qualified, FILE_OPEN_ uses the current
settings, including the system name, in the =_DEFAULTS DEFINE, for unspecified parts
including the system.