PORT-DESPOOL - Despooling Print Jobs to a Port
Despools print jobs to a printer or terminal attached to the port at which PORT-DESPOOL is entered.
PORTOUT is a synonym for the PORT-DESPOOL command.
Syntax
PORT-DESPOOL {despooler-name} {(options)}
Syntax Element
despooler-name is the name of a PTR Despooler used to despool print jobs to your terminal, or printer, attached to your terminal. This must be created (using SPM or BUILD.DESPOOLERS) prior to using PORT-DESPOOL.
If despooler-name is omitted, PORT-DESPOOL executes a despooler with a name comprising PTR with the originating port number appended. For example, if you enter PORT-DESPOOL at port 4, despooler PTR4 is executed.
Options
L Must be used when executing PORT-DESPOOL from a P99 terminal to despool a print job to a device connected to the auxiliary port.
S Despools print jobs to the device connected to the auxiliary port from any terminal, other than a P99 terminal.
X Exits despooling, returning to TCL or the controlling Proc, after all print jobs are despooled.
If you omit the X option, you must terminate the
port despooling process by pressing ctrl+break
and then entering END
at the Rdb
prompt on the originating terminal, or by
n The translation table number assigned to the despooler while it is active. The translation assignment is cancelled when the Spooler is stopped. See SP-STATUS Action Code 8 Change Translation and SP-TRANSLATE for more information.
Comments
PORT-DESPOOL will despool all 'Queued' print jobs from all formqueues served by the specified despooler. A print job with a different status, such as 'Hold', 'Finish' or 'Align' is not despooled.
If you are despooling to a slave printer attached to your terminal, ensure that the correct control character(s) are sent to the printer to activate it. Refer to the terminal documentation for information.
Example
This example assumes that the port at which you enter PORT-DESPOOL is port 21.
Now use SPM to create PTR despoolers PTR21 and PTRDAVE. Also create formqueues PD1, PD2 and DAVE. Assign the despoolers as follows:
PTR Despooler | Form queue |
---|---|
PTR21 | PD1 |
PTRDAVE | PD2 |
PTRDAVE | DAVE |
Now enter:
SP-ASSIGN =PD1
to assign all print reports to the formqueue PD1. Then create a print report; enter:
BLOCK-PRINT REP1
The block print REP1 is queued in PD1.
Next enter:
SP-ASSIGN =DAVE
BLOCK-PRINT REP2
and
SP-ASSIGN =PD2
BLOCK-PRINT REP3
Block print REP2 is queued in DAVE and REP3 is queued in PD2.
Now enter:
PORT-DESPOOL (XS
then,
PORT-DESPOOL PTRDAVE (XS
In the first command, the despooler name is not specified, therefore PORT-DESPOOL executes PTR21 assigned to the formqueue PD1 and despools the report REP1.
Next PORT-DESPOOL executes PTRDAVE which is assigned to formqueues DAVE and PD2. This despools the reports REP2 and REP3. The order in which they are despooled will depend on the priorities assigned to the formqueues DAVE and PD2 in the despooler definition item created using SPM.