Redirect jobs to another printer
Component: | SPOOL |
Functional area: | Controlling spoolout job |
Domain: | SPOOL-PRINT-ADMINISTRATION |
Privileges: | STD-PROCESSING |
Routing code: | N |
Note
The REDIRECT-PRINT-JOB command corresponds to the old REDIRECT-REMOTE-OUTPUT command; the command name REDIRECT-REMOTE-OUTPUT is still accepted as an alias.
Function
The REDIRECT-PRINT-JOB command redirects spoolout jobs:
from an RSO printer or pool to another RSO printer or pool
from an RSO printer or pool to a local printer pool
from a local printer pool to an RSO printer or pool
from a local printer pool to a local printer pool
from a local printer pool to a central printer pool
from a Dprint printer pool to a Dprint printer pool
Nonprivileged users can only redirect their own jobs. RSO device administrators can redirect their own jobs and jobs started with the operand REDIRECTION-ALLOWED=*YES in the PRINT-DOCUMENT command on a device for which they are entered as the RSO device administrator. Systems support can redirect any job.
Only jobs in the WAIT or KEEP status are redirected. All jobs can be redirected, or only some of them. In the latter case the jobs are selected by specifying the TSN, the job status (job type), the user ID and the name of the form or job. It is possible to specify a negative list.
As a check on the new destination, the jobs to be redirected are also submitted to PRINT-DOCUMENT command validation.
Requirements for command execution
The specifications for both printers must be different (different printer names or different printer pool names).
The control character (ESCAPE character) must be defined the same for the specified printers.
In family processing, all (sub)jobs must have the specified status (JOB-TYPE=...).
The files to be printed must not be on an exported pubset.
If the spoolout job is directed to a printer pool, the assigned printer must not be specified in the REDIRECT-PRINT-JOB command. The job always belongs to the pool, even if it is in the KEEP status for example.
ExampleA FAMILY-PRINT has been started for the pool POOL1. A job from this is in KEEP status on the device DVC1 which belongs to the pool POOL1.
/SHOW-PRINT-JOB-STATUS INF=*DESTINATION
TSN SERVER M STA R DEVICE DESTIN ERCOD ERMSG DEVICE TYPE 64CS *HOME R KP DVC1 POOL1 64CS *HOME R WT POOL1 POOL1 % SCP0947 2 JOBS FOUND WITH 40 PAM PAGES. COMMAND TERMINATED
The following commands have no effect on FAMILY with TSN 64CS:
/REDIRECT-PRINT-JOB JOB-ID=*DEVICE(DEV-NAME=DVC1),SELECT=*PAR( -
JOB-TYPE=*KEEP)
/REDIRECT-PRINT-JOB JOB-ID=*DEVICE(DEV-NAME=DVC1),SELECT=*PAR( -
JOB-TYPE=*ALL)The following commands redirect FAMILY with TSN 64CS:
/REDIRECT-PRINT-JOB JOB-ID= *DEVICE(DEV-NAME=POOL1),SELECT=*PAR( -
JOB-TYPE=*ALL)JOB-TYPE=*ALL)
/REDIRECT-PRINT-JOB JOB-ID=*TSN(TSN=64CS),SELECT=*PAR(JOB-TYPE=*ALL)
Restrictions
The following restrictions are applicable, depending on the direction of redirection.
JOB-IDENTIFICATION = *DEVICE-NAME
| TO= | ||||
---|---|---|---|---|---|
RSO printer | RSO pool | Local pool | *CENTRAL | Dprint pool | |
RSO printer | (1) | (2) | (3) | (3) | n.s. |
RSO pool | (2) | (2) | (3) | (3) | n.s. |
Local pool | (4) | (4) | (5) | n.s. | n.s. |
*CENTRAL | n.s. | n.s. | n.s. | n.s. | n.s. |
Dprint pool | n.s. | n.s. | n.s. | n.s. | (6) |
n.s.= | not supported (a pool must be set up for redirecting local printouts) |
Rejected in the following cases:
the CONTROL-MODE operand in the PRINT-DOCUMENT command is not set to *PAGE, and device types concerned are different.
escape characters are incompatible.
Rejected if CONTROL-MODE in the PRINT-DOCUMENT command was not set to *PAGE.
Rejected if the following operands were specified in the PRINT-DOCUMENT command:
INPUT-TRAY=...
CHAR-SET-ATTRIBUTES=...
FORMS-OVERLAY-BUFFER=...
LINE-SPACING=*NO
CONTROL-MODE not equal *PAGE
Rejected if following operands were specified in PRINT-DOCUMENT command:
ROTATION-LOOP-NAME=...
CHARACTER-SETS=*POOL
FORMS-OVERLAY-BUFFER=...
CONTROL-MODE not equal *PAGE
ROTATION=...
INPUT-TRAY=...
Local print jobs valid for a subset of device types in a printer pool can be redirected to another printer if the target printer belongs to that subset.
Dprint jobs can only be redirected if the command is entered on the server accepting the print job. If this is not the case, the print job must be redirected using the MODIFY-PRINT-JOB-ATTRIBUTES command. Distributed print jobs valid for a subset of device types in a Dprint pool can be redirected to another printer if the target printer belongs to that subset.
JOB-IDENTIFICATION= *TSN
If the TSN is used as the selection criterion, all operands of the PRINT-DOCUMENT command are permitted, albeit on the user's own responsibility.
Information following command processing
On normal termination the number of redirected jobs is output.
On abnormal termination the reason is output:
no output for the device
device(s) not defined
system error
redirection mode not supported
For each “redirectable” job (see above) that was not redirected, a warning message indicating the reason is output.
Format
REDIRECT-PRINT-JOB | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
JOB-IDENTIFICATION = *DEVICE-NAME(...) / *TSN(...)
Identification of the spoolout jobs to be redirected.
JOB-IDENTIFICATION = *DEVICE-NAME(...)
The spoolout jobs to be redirected are identified using the name of the printer on which the jobs are to be processed.
DEVICE-NAME = <alphanum-name 1..8>
Name of the printer or printer pool.
JOB-IDENTIFICATION = *TSN(...)
Spoolout jobs designated by their TSN are redirected.
TSN = list-poss(16): <alphanum-name 1..4>
List of TSNs for the spoolout jobs.
TO-DEVICE = *CENTRAL / <alphanum-name 1..8>
The spoolout jobs are redirected to the central computer center printer (*CENTRAL) or the specified printer.
SELECT = *PARAMETERS(...) / *ALL
The spoolout jobs can be selected by specifying the user ID for the job, the status, the job name or the form name.
SELECT = *PARAMETERS(...)
Selection of a subset of spoolout jobs. The spoolout jobs are redirected if they fulfill the specified criteria (AND operation).
JOB-TYPE = *WAIT / *KEEP / *ALL
The selection criterion is whether the spoolout job is in the WAIT or KEEP status. If *ALL is specified, no distinction is made.
USER-IDENTIFICATION = *ALL / list-poss(16): <name 1..8> / <c-string 1..8 with-low>
The selection criterion is the user ID under which the spoolout job was created; it is possible to specify a list. If *ALL is specified, the user ID is not used as a selection criterion.
FORM-NAME = *ALL / list-poss(16): <alphanum-name 1..6>
The selection criterion is the name of the form to be used for printing; it is possible to specify a list. If *ALL is specified, the form name is not used as a selection criterion.
SPOOLOUT-NAME = *ALL / list-poss(16): <alphanum-name 1..8> / <c-string 1..8 with-low>
The selection criterion is the job name for the spoolout job; it is possible to specify a list. If *ALL is specified, the job name is not used as a selection criterion.
SELECT = *ALL
All spoolout jobs are redirected.
EXCEPT = *NONE / *PARAMETERS(...)
List of exceptions for spoolout jobs which are not to be redirected.
EXCEPT = *NONE
No list of exceptions.
EXCEPT = *PARAMETERS(...)
Specifies the jobs selected with SELECT=... which are to be excepted. Specifying *NONE means that no exceptions are specified.
USER-IDENTIFICATION = *NONE / list-poss(16): <name 1..8>
Spoolout jobs created by the specified user IDs are not redirected.
FORM-NAME = *NONE / list-poss(16): <alphanum-name 1..6>
Spoolout jobs using the specified forms are not redirected.
SPOOLOUT-NAME = *NONE / list-poss(16): <alphanum-name 1..8> / <c-string 1..8 with-low>
Spoolout jobs with the specified job names are not redirected.
Return codes
(SC2) | SC1 | Maincode | Meaning/Guaranteed messages |
---|---|---|---|
0 | CMD0001 | No error | |
2 | 0 | SCP1036 | Lock error |
2 | 0 | SCP1039 | Device incompatibility |
2 | 0 | SCP1040 | No device definition |
2 | 0 | SCP1041 | No authorization for specified TSN |
2 | 0 | SCP1042 | EQUISAM file error for specified TSN |
2 | 0 | SCP1043 | Slot manager error for specified TSN |
2 | 0 | SCP1044 | Specified TSN not found |
2 | 0 | SCP1045 | Pubset exported |
2 | 0 | SCP1047 | Output not possible on specified device |
2 | 0 | SCP1048 | Invalid PRINT-DOCUMENT command |
2 | 0 | SCP1049 | RSO subsystem not loaded |
1 | CMD0202 | Syntax error | |
1 | SCP0973 | Semantic error | |
32 | SCP0974 | System error. Command rejected | |
64 | SCP0975 | No authorization for command | |
64 | SCP0976 | Identification of device not possible |