Despoolers

A Despooler process takes a job from the head of a formqueue and despools the data to a pre-defined output device. Despoolers available on a database are defined in the DESPOOLER.CONTROL file in SYSFILES. Each Despooler has one output device assigned to it.

Refer to Spooler File Formats for a description of the DESPOOLER.CONTROL definition item structure.

The print job at the head of the queue is processed by the first Despooler able to take it.

Despoolers will generally remove a job from the jobs and control files once it has been successfully printed. However, if the H option is assigned to the job it is held in the queue. A Spooler command is required to re-print or delete the job (see Putting Jobs on Hold).

Note

By default, despoolers check every 5 seconds to see if there is a job to be printed. The interval can be changed by setting the RealIdleDespoolerSleep configuration parameter or the REALIDLEDESPOOLERSLEEP environment variable to the required number of seconds. The environment variable setting overrides that in the configuration parameter.

Creating a Despooler Definition

To create a Despooler definition use either SPM Option 2 or the DSM command at TCL. These commands are restricted to SYSMAN and SYSPROG users.

Alternatively, use BUILD.PRINTERS to create despoolers and formqueues for printers that are configured on the host, or BUILD.DESPOOLERS to create despoolers, formqueues and NETDEVS entries for specified ports, and despoolers for tape units TAPE1 to TAPE16.

Starting a Despooler

Two commands are used to start a Despooler process:

START-DESPOOLER
Starts a background Despooler process. The process then runs in the background without interfering with the Reality foreground process and continues despooling, until stopped using STOP-DESPOOLER.

Note

START-PRINTER and STOP-PRINTER are synonyms for START-DESPOOLER and STOP-DESPOOLER. SP-STATUS action codes 9 and 10 are also equivalent.

PORT-DESPOOL
Starts a process in the foreground to despool to a port. Despooling continues until the formqueue is empty, or the process is terminated using ctrl+break, or is stopped using STOP-DESPOOLER from another terminal.

Note

PORTOUT is a synonym for PORT-DESPOOL.

Multiple Despoolers and Formqueues

A single formqueue can be serviced by multiple Despoolers. Multiple formqueues can also be serviced by a single Despooler. Associated formqueues are defined in the Despooler definition item. The Despooler services multiple formqueues according to a predefined priority (1 to 9), also defined in the Despooler definition item. A job at the head of the highest priority queue (priority level 1) is despooled first.

Checking for Despooler Errors

If errors occur during the execution of the Spooler, they are recorded in the SYSTEM-LOG file. You can use the LIST command with macros DSP.DETAIL and DSP.ERRORS to display an English report of the errors. Refer to Checking for Spooler Errors for details.

Monitoring Despoolers

The Despooler Monitor process, executed using the DSPMON command, provides the facility to automatically start and stop a selected list of Despoolers, as necessary, while limiting the total number of Despoolers active at any one time.

Resolving Despooler Problems

If a despooler hangs, it can be terminated with the LOGOFF command - you can find out which port the despooler is using with SP-STATUS option 12 (Despooler List).

The RESET.DESPOOLER command resets the despooler system.

Caution

RESET.DESPOOLER must not be executed if there are any active despoolers or open print jobs in the Spooler system. Use of RESET.DESPOOLER while a despooler is active or a print job is open will cause data corruption within the system.

The SP-FIX command can be used to 'clean up' print jobs left in an inconsistent state after a program crash.