Spooler Programmer's Guide

Spooler Procedure Calls
Spooler Programmer’s Guide522287-002
4-23
SPOOLBATCHNAME Procedure
SPOOLBATCHNAME Procedure
The SPOOLBATCHNAME procedure returns the name of the batch job currently being
spooled to the collector. This procedure can be used when spooling at levels 1, 2, or
3.
error-code returned value
INT
returns one of the following spooler error codes:
filenum-of-collector input
INT:value
is the file number of an open supervisor file. The file number is returned when the
supervisor is opened.
batchname output
INT:ref:16
is the name of the batch job currently being spooled to the collector through the
specified file number. If the spooler job does not belong to a batch job, blanks are
returned.
Considerations
The following considerations apply to the use of the SPOOLBATCHNAME procedure:
A call to SPOOLBATCHNAME can be issued by an application spooling at any
level.
When spooling at level 1, a job is not created until after the WRITE[X], SETMODE,
or CONTROL procedure is called once.
When spooling at level 2 or 3, a job is not created until after the SPOOLSTART
procedure is called.
error-code := SPOOLBATCHNAME ( filenum-of-collector ! i
,batchname ); ! o
0 Successful operation
%1000-%1377 Error on file to collector (bits <8:15> contain a file-system error
number
%10000 Missing parameter
%11001 Attempted to write to collector without opening the file first