Spooler Programmer's Guide
Spooler Procedure Calls
Spooler Programmer’s Guide—522287-002
4-32
SPOOLERCOMMAND Procedure and Subcommand
Parameters
SPOOLERCOMMAND Procedure and Subcommand Parameters
The SPOOLERCOMMAND procedure is useful to programmers who want to perform
Spoolcom operations from within application programs. The Spoolcom commands that
can be sent are COLLECT, DEV, JOB, LOC, PRINT, and SPOOLER.
The remaining commands—EXIT, FC, HELP, and OPEN—are executed by Spoolcom,
and therefore they are not related to the supervisor.
To send a Spoolcom command to the spooler supervisor from within an application,
you specify its equivalent using SPOOLERCOMMAND procedure commands. The
commands are described here in command-code order, starting with 1.
Spoolcom DEV Command Parameters
To send the equivalent of a Spoolcom DEV command, specify a file number for the
filenum-of-supervisor parameter, a command-code of 1, and the command-
parameter, which in this case is a print device name of up to 32 characters in internal
filename format. Find the subcommand-code and the subcommand-parameter for
the Spoolcom DEV parameters you want from Table 4-3.
filenum-of-supervisor: a file number
command-code: 1
command-parameter: a printer name
For example, to specify the speed of printer $LP3, you could enter the following:
INT .DEV [0:15] := [" $LP3 "];
COM^ERROR := SPOOLERCOMMAND (4, 1, DEV, 101, 300);
Refer to the Spooler Utilities Reference Manual for a description of the Spoolcom DEV
parameters.
Note. Before calling the SPOOLERCOMMAND procedure, you must open a file to the spooler
supervisor. You must specify waited I/O.
Spoolcom
Command
SPOOLERCOMMAND
Command Code
DEV 1
JOB 2
LOC 3
COLLECT 4
PRINT 5
SPOOLER 6
FONT 7
BATCH 8