Spooler Programmer's Guide

Using the Spooler Interface Procedures
Spooler Programmer’s Guide522287-002
2-2
External Declarations for Spooler Interface
Procedures
External Declarations for Spooler Interface
Procedures
To use spooler interface procedures in a TAL program, you must declare them to be
external to your program. The external declarations for the interface procedures are
located in the file $SYSTEM.SYSTEM.EXTDECS0. They can be sourced into your
program with the following compiler command:
?SOURCE $SYSTEM.SYSTEM.EXTDECS0 (SPOOLSTART, SPOOLWRITE, ... )
See the TAL Reference Manual for a full explanation of the EXTERNAL procedure
declaration and the ?SOURCE compiler directive.
Levels of Spooling From an Application
Program
The three ways for an application program to spool a job to a collector are as follows:
Level-1 spooling
Job attributes default to the default attribute values.
The application sends data for a job to the collector by using the WRITE[X],
CONTROL, and SETMODE Guardian file-system procedures.
Level-2 spooling
Job attributes can be specified using the SPOOLSTART procedure.
The application sends data for a job to the collector by using the WRITE[X],
CONTROL, and SETMODE Guardian file-system procedures.
Level-3 spooling
Job attributes can be specified using the SPOOLSTART procedure.
The application sends data for a job to the collector by using the
SPOOLWRITE, SPOOLCONTROL, SPOOLCONTROLBUF, and
SPOOLSETMODE procedures.
Instead of requiring the transfer of data from the procedure buffer to the
collector each time a procedure is called, the spooler interface procedures
allow you to collect (but not transfer) the data in a special buffer. Each time the
SPOOLWRITE procedure is called, it checks to see whether the write
operation can cause this buffer to overflow. If it can, the procedure initiates the
transfer of the buffer contents and then begins filling the buffer again.
Two types of buffer areas for the data can be used in the spooler interface
procedures: