NBSpool for MPE Reference Guide

Chapter 5
5-18
Background Processing With SPOOLCMD Files
This section discusses background processing with SPOOLCMD files, which contain NBSpool
commands to operate on spool files based on their device class. The NBSpool command that is used
in this background processing is the
SPOOLER command.
SPOOLER Command
The SPOOLER command controls the execution of background NBSpool spooler processes. These
processes run under the control of the process
SPOOLCOP, which must be running in order for this
command to execute. Spooler processes are executions of NBSpool with a command file used as the
$STDIN for each process. These command files are ASCII files stored in the SPOOLCMD.NETBASE
account. The name of the command file is the same as the spooler name.
Each spooler process will redirect its output to a spool file with the same name as the spooler. By
default, these output files are sent to the device LP with an outpri of
1
. Two CI variables can be used
to redirect the output:
:SETVAR SPOOLOUTPRI 5 (change outpri to 5)
:SETVAR SPOOLOUTDEV "MYLP" (change device to MYLP)
:SETVAR SPOOLOUTDEV "$STDLIST" (output goes to $STDLIST)
An additional feature of SPOOLER processes is they can immediately cause the XEQ command to
begin processing if the
DEVICE= parameter is used with the XEQ command. When a spool file is
closed, the
SPOOLCOP process will wake up any spooler processes that are waiting on a device class
or
ldev
specified by the DEVICE= parameter of the XEQ command. If more than one spooler is
waiting on the same device, the first available spooler process will process the file.
The
STOP command does not immediately stop the execution of a spooler process. It functions in
the same manner as the
XEQSTOP command unless the NOW parameter is specified.
Note. The
WAIT= parameter must be specified on the XEQ command. Use a larger value
if the
DEVICE= parameter is specified on the XEQ command.
SPOOLER Syntax.
O> SPOOLER spoolname;{START}
{STOP[;NOW]}
;SHOW