Controlling the SPOOLER Process--the SPOOLER Command [ Native Mode Spooler Reference Manual ] MPE/iX 5.0 Documentation
Native Mode Spooler Reference Manual
Controlling the SPOOLER Process--the SPOOLER Command
You may use the SPOOLER command to start, stop, suspend, and resume
spooler processes, and to release spool files from a spooler process.
The SPOOLER command may be entered only at the master console unless
allowed to other users with the ALLOW or ASSOCIATE commands. Refer to
the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and
32650-90364) for information about ALLOW and ASSOCIATE. The ASSOCIATE
command is also discussed in "Allowing Users Control of Spooled Devices"
in appendix C.
The general form of the SPOOLER command is
{;SHOW }
{;OPENQ [;SHOW] }
{;SHUTQ [;SHOW] }
{;START [;OPENQ] [;SHOW] }
{ [;SHUTQ] }
{;STOP [;FINISH] [;OPENQ] [;SHOW] }
{ [;NOW ] [;SHUTQ] }
{ [[;FINISH] [;NOKEEP]] }
{ldev } { [[;NOW ] [;KEEP ]] }
SPOOLER [DEV=] {devclass} { [ ] }
{devname } {;SUSPEND [[;OFFSET= [+] page]] }
{ [[ [-] ]] }
{ [ ] }
{ [[;OPENQ] [;SHOW] ] }
{ [[;SHUTQ] ] }
{ }
{;RESUME [;OFFSET= [+] page] [;OPENQ] [;SHOW]}
{ [ [-] ] [;SHUTQ] }
{;RELEASE [;OFFSET= [+] page][;OPENQ] [;SHOW]}
{ [ [-] ][;SHUTQ] }
You must always specify a logical device number, a device class or a
device name. You must also always specify at least one other parameter.
In other words, specifying only a device is not enough. You must specify
what is to be done to that device.
If you specify a device class, the specified operation applies to all
devices in the class.
NOTE Any numbers or devices in the following examples are used for
illustrative purposes only. You would use values appropriate for
your system's configuration.
For a detailed explanation of the SPOOLER command and its parameters, see
chapter 4.
NM and CM compatibility issues:
The design of the NM spooler prevents full backward compatibility with
the CM spooler commands.
For instance, SUSPENDSPOOL and SPOOLER...;SUSPEND without the ;FINISH
option causes the spooler process to retain ownership of the spool file
that it is currently processing.
Suspending.
Use the new command SPOOLER with the parameter SUSPEND or the command
SUSPENDSPOOL. SUSPENDSPOOL and SPOOLER ...;SUSPEND without the ;FINISH
option causes the spooler process to retain ownership of the spool file
that it is currently processing. Furthermore, the spooler does not cap
the current file with a page eject and trailer, but pauses the output.
The printer resumes printing exactly where it left off when the
SPOOLER...;RESUME command with no offset is issued.
Both SPOOLER...;SUSPEND ;KEEP and SPOOLER...;SUSPEND with no offset pause
the output. The spooler resumes spooling exactly where it left off.
To suspend spooling where class LP consists of logical devices 6, 9, and
11, and where their spooler processes retain ownership of any spool files
that they are currently processing, enter:
SPOOLER LP ;SUSPEND
You can specify an offset when you suspend spooling. Suppose that the
spooler for logical device 6 is printing page 20. You want to suspend
spooling so that when you direct the spooler to resume, it begins
printing page 17. Enter:
SPOOLER 6 ;SUSPEND; KEEP; OFFSET = -3
The KEEP parameter directs logical device 6 to retain ownership of the
spool file that it is currently processing. The KEEP parameter need not
be entered. It is the default.
You can use the ;RELEASE parameter of the SPOOLER command to release a
retained spool file.
Resuming.
Use the NMS command SPOOLER with the parameter RESUME or the command
RESUMESPOOL.
Both SPOOLER...;RESUME and RESUMESPOOL begin printing where the printer
left off, provided that the following conditions are met:
* You suspended the spooler with either SUSPENDSPOOL (without the
;FINISH option) or SPOOLER ldev ;SUSPEND (without the ;FINISH
option but with the ;KEEP option and with no specified offset).
* You did not enter SPOOLER ldev ;RELEASE while the spooler was
suspended. (The ;RELEASE parameter directs a suspended spooler to
release a spool file that it is currently retaining.)
* You did not specify an offset as part of the RESUME command.
Now suppose that logical device 6 is owned by a spooler process. Enter:
SPOOLER 6 ;SUSPEND
Suppose that the spooler had just transmitted line 20 of page 10 and
suppose that the conditions above hold. To continue spooling at line 21
of page 10 as if the suspension never took place, enter:
SPOOLER 6 ;RESUME
NOTE If you do not suspend this way, the spooler prints a trailer and
prints a header when it resumes. If the spooler releases a file,
any specified offset is honored by the next spooler which prints
the file. If you do not specify an offset, the next spooler starts
at the beginning of the page at which the previous output was
suspended.
Spooler tasks
The primary spooling tasks are discussed here. Additional spooler tasks
are discussed in "Controlling the Spooler Process--Other Commands" in
this chapter.
Starting spooling
To create and activate a new spooler process on a spoolable device,
enter:
SPOOLER DEV=6;START
Or, because DEV= is optional, you could also enter:
SPOOLER 6;START
Stopping spooling
To stop a spooler process, enter:
SPOOLER 6;STOP
This command also closes the spooling queues for logical device 6. To
stop the spooler process and to leave the spooling queues open for
logical device 6, enter:
SPOOLER 6;OPENQ;STOP
Suspending spooling
When a spooler is suspended, spool files may continue to be created but
the spooler process does not continue to print files.
Suspend spooling but finish printing first.
To suspend spooling but allow a spool file that is currently being
printed to finish printing, enter:
SPOOLER 6;SUSPEND;FINISH
Suspend spooling now.
To immediately suspend spooling and not allow a currently printing spool
file to finish, enter:
SPOOLER 6;SUSPEND;NOW
Because ;NOW is the default, it may be omitted.
Suspend spooling and retain the current file.
To suspend spooling and allow the spooled device(s) to retain ownership
of the spool file currently printing enter:
SPOOLER 6;SUSPEND;NOW;KEEP
If a device retains a spool file, that spool file begins printing when
spooling is resumed on that device.
The ;KEEP parameter is the default and can be used only when ;NOW is
specified or taken as the default. You could achieve the same result by
entering:
SPOOLER 6;SUSPEND
Suspend spooling and release spool file.
To suspend spooling and direct the printer to release (not retain) the
currently printing spool file, enter:
SPOOLER 6;SUSPEND;NOW;NOKEEP
;NOKEEP may only be used when ;NOW is specified or taken by default.
If a spool file is not retained, a different spool file may begin
printing when spooling is resumed. Also, the released spool file could
be printed by another spooler process. In other words, the spool file is
closed and prints based on its output priority relative to other spool
files.
Suspending and telling the spooler where to resume.
Use the ;OFFSET parameter to specify where the spooler process is to
position itself within the spool file before beginning to print again.
;OFFSET is valid only in the following cases:
* when the spooler is actively printing a file and ;SUSPEND is used
* when the spooler is releasing a file (with the ;RELEASE option)
that it retained during a previous suspend
* when the spooler is resuming printing of a file (with the ;RESUME
option) it retained during a previous suspend
To suspend spooling and to position backward three pages from the page
that is being printed, enter:
SPOOLER 6;SUSPEND;OFFSET=-3
The - indicates that the offset is backward rather than forward. In this
case printing would resume three pages back from the last page printed
unless the offset is further adjusted with the ;RESUME or ;RELEASE
options described later in this section.
To suspend spooling and to position forward five pages in the current
spool file, enter:
SPOOLER 6;SUSPEND;OFFSET=+5
The + sign indicates that the offset is forward. In this case printing
would resume five pages forward unless the offset is further adjusted
with the ;RESUME or ;RELEASE options described later in this section.
To suspend spooling and to position seven pages from the beginning of the
spool file, enter:
SPOOLER 6;SUSPEND;OFFSET=7
The absence of a + or - sign indicates an absolute offset from the
beginning of the spool file.
NOTE If ;OFFSET is not specified, printing resumes at the page where it
was stopped. This is also the default.
To be sure that a spool file begins printing at its beginning, enter:
SPOOLER 6;SUSPEND;OFFSET=1
NOTE It is important to understand that pages are defined only for CIPER
protocol devices and HP 2680 and HP 2688 page printers. For these
devices, a page is one physical sheet. Pages are not defined for
other devices, and the results of using the ;OFFSET parameter are
unpredictable for them.
Releasing a spool file
If the ;SUSPEND parameter is used with the ;KEEP option or the ;KEEP
option is taken by default (that is, neither ;KEEP nor ;NOKEEP is
specified), the spooler process retains the spool file which was printing
when the command was entered. This means that the currently printing
spool file is the first spool file to print when spooling is resumed.
You may use the ;RELEASE parameter to release a retained spool file. A
released spool file is closed and the spool file prints based on its
output priority relative to other spool files. The released spool file
may also be printed by another spooler process.
To release a retained spool file, enter:
SPOOLER 6;RELEASE
You may use the ;OFFSET option to specify the spool file location where
printing begins when the spool file finally begins to print. To release
a spool file and to specify that it is to begin printing 10 pages back
from the current page position, enter:
SPOOLER 6;RELEASE;OFFSET=-10
To release a spool file but ensure that it resumes printing at its
beginning, enter:
SPOOLER 6;RELEASE;OFFSET=1
You may also position the spool file forward from the current page
position or forward from the beginning of the spool file. For
information on how to do this, see the previous section on suspending
spool files. The ;OFFSET parameter works in exactly the same way with
each of the ;SUSPEND and ;RELEASE parameters. When you use the ;RESUME
parameter, ;OFFSET works in the same way except for the case of a spooler
that did not retain its file. ;OFFSET is not valid with ;START or ;STOP.
Resuming spooling
Resume spooling for a previously suspended spooler process with the
;RESUME parameter of the SPOOLER command.
The following examples assume that the specified spooler process retained
its file when it suspended.
To resume spooling, enter:
SPOOLER 6;RESUME
To resume spooling and to begin printing back three pages from the
current page position enter:
SPOOLER 6;RESUME;OFFSET=-3
To resume spooling and to begin printing forward two pages from the
current page position enter:
SPOOLER 6;RESUME;OFFSET=+2
To resume spooling and to begin printing five pages from the beginning of
the spool file enter:
SPOOLER 6;RESUME;OFFSET=5
To resume spooling at the first page (beginning) of the spool file enter:
SPOOLER 6;RESUME;OFFSET=1
Remember, the - sign indicates back from the last page that was printed,
the + means forward from the last printed page, and no sign preceding the
offset number means forward from the beginning of the spool file.
NOTE If ;OFFSET is not specified with the RESUME command, printing
resumes at the page where it was stopped or at the page specified
as an offset with the ;SUSPEND or ;RELEASE options. This is also
the default.
Displaying spooler process status
The SPOOLER command ;SHOW parameter displays the status of the spooling
process. To issue this command, enter:
SPOOLER 6;SHOW
If a device class is specified, status is displayed for all spoolable
devices in the class.
You may use ;SHOW with any combination of other SPOOLER command
parameters. For example:
SPOOLER 6;SUSPEND;OFFSET=1;OPENQ;SHOW
;SHOW produces a listing similar to:
LDEV DEV SPSTATE QSTATE OWNERSHIP SPOOLID
6 0000006 *SUSPEND OPENED OUT SPOOLER #O237
19 0000019 *ACTIVE OPENED OUT SPOOLER #O264
The asterisk (*) indicates that the device is in a pending state on the
way to the requested state. For example, suppose that you issue a
SPOOLER command to suspend spooling. It is possible for the ;SHOW option
of the command to finish processing before the spooler is fully
suspended. In this case, an asterisk precedes the state of the spooler,
shown under SPSTATE, to indicate that it is being changed.
Opening and closing the spooling queue
You may use the ;OPENQ option to open the spooling queue and the ;SHUTQ
option to close the spooling queue. You may use ;OPENQ by itself or
;SHUTQ by itself or you may use either of these two options with ;START,
;STOP, ;SUSPEND, ;RESUME, or ;RELEASE.
To open the spooling queue for each device in class LP while stopping the
spooler process(es), enter:
SPOOLER LP;STOP;OPENQ
To close the spooling queue(s) while starting the spooler process(es),
enter:
SPOOLER LP;START;SHUTQ
The spooling queue for a device is opened by default whenever you issue
the SPOOLER command with the ;START option. So
SPOOLER LP;START
is the same as
SPOOLER LP;START;OPENQ
The spooling queue is closed by default whenever you issue the SPOOLER
command with the ;STOP option.
For more information on opening and closing the spooling queue, see the
OPENQ and SHUTQ commands later in this section.
MPE/iX 5.0 Documentation