Move print job from EQUISAMQ file
Component: | SPOOLSYS |
Functional area: | Controlling spoolout job |
Domain: | SPOOL-PRINT-ADMINISTRATION |
Privileges: | PRINT-SERVICE-ADMINISTRATION |
Function
Systems support can use the MOVE-PRINT-JOBS command to extract print jobs from one EQUISAMQ file (job spool queue) and move them into another. This allows systems support to remove urgent print jobs from a system that has failed and place them in the EQUISAMQ file of a functioning system for them to be printed. The command can also be used to relieve the print load of a system.
The function is also available when the SPOOL subsystem is not loaded.
The print jobs from the EQUISAMQ file of one system can be moved directly into the EQUISAMQ file of another system, or they can be stored in a work file before being finally moved to the EQUISAMQ file of the destination system and vice versa.
The number of print jobs that were moved successfully is output in the SPA0114 message. Each print job that has been successfully transferred is deleted from the input file.
If the TSN of a transferred print job already exists on the target system the job is assigned a new TSN and a message is issued to the console. The access authorizations pertaining to the print job remain unchanged.
The number 0 means that either no print job has been chosen or that no selection was possible due to an error.
As a standard, all local print jobs may be transferred. However, it is also possible to transfer all the distributed print jobs. Additional the number of print jobs moved may also be restricted with the aid of selection attributes (SELECT=*BY-ATTRIBUTES(...) operand):
Selection via the pubset on which the required resources are located (RESOURCES-PUBSET operand).
Selection via job status (JOB-TYPE operand); waiting, active or on-hold jobs can be selected.
Selection via the job type (JOB-SCOPE operand); local or distributed print jobs may be selected.
The MOVE-PRINT-JOBS command supports all print jobs that are processed by the Dprint, SPOOL, RSO, SCSIPCL and SPS subsystems. Distributed print jobs can only be processed if the SPOOL subsystem is not loaded.
The following distributed printed jobs can be processed:
Print jobs that were output by remote clusters (BS2000 or Xprint) and processed by the server located on the gateway host (gateway host = server host).
Print jobs that were output by a BS2000 client host and processed on the associated home server (client host = server host).
The Dprint commands MODIFY-MULTIPLE-PRINT-JOBS and CANCEL-MULTIPLE-PRINT-JOBS can be used for other distributed print jobs (see the “Distributed Print Services” User Guide [10]).
Format
MOVE-PRINT-JOBS | ||||||||||||||||||||||||||||||||||||
|
Operands
FROM-FILE = *STD / <filename 1..54 without-gen-vers> *INACTIVE- SYSTEM-PRINT-QUEUE(...)
The name of the original file from which the print jobs are to be transferred. This can be the EQUISAMQ file on the local system ($TSOS.EQUISAMQ on the home pubset), an EQUISAMQ file on an imported pubset or a work file generated with MOVE-PRINT-JOBS.
FROM-FILE = *STD
The print jobs are transferred form the EQUISAMQ file on the local system ($TSOS.EQUISAMQ on the home pubset).
FROM-FILE = <filename 1..54 without-gen-vers>
The print jobs are transferred from the file specified. The path name of an EQUISAMQ file ($TSOS.EQUISAMQ) or of a work file may be specified. The specified file must be existent and it must have the file attributes of an EQUISAMQ file.
A work file contains print jobs that have already been “collected” with MOVE-PRINT-JOBS and that are now to be transferred into an EQUISAMQ file or into another work file.
FROM-FILE = *INACTIVE-SYSTEM-PRINT-QUEUE(...)
The print jobs are transferred from the remote system’s EQUISAMQ file ($TSOS.EQUISAMQ on a pubset imported in the local system).
PUBSET= <cat-id 1..4>
Catalog ID of the imported pubset.
TO-FILE = *STD / <filename 1..54 without-gen-vers>
The name of the destination file into which the print jobs are to be transferred. The destination file can be an EQUISAMQ file on the local system (home pubset), an EQUISAMQ file on an imported pubset or a work file, however, it must not be the original file specified in the FROM-FILE operand.
TO-FILE = *STD
The print jobs are transferred to the EQUISAMQ file on the local system
($TSOS.EQUISAMQ on the home pubset). The file has to exist already (generated when the SPOOLSYS subsystem is started).
TO-FILE = <filename 1..54 without-gen-vers>
The print jobs are transferred into the specified destination file. The path name of an EQUISAMQ file ($TSOS.EQUISAMQ) or of a work file may be specified. The specified file must have the file attributes of an EQUISAMQ file. If the file does not yet exist, it will be generated with the appropriate file attributes. An exception to this rule is the EQUISAMQ on the local system. This must already exist (it is generated when the SPOOLSYS subsystem is started).
Print jobs can be collected in a work file and then transferred to an EQUISAMQ file at some later stage.
SELECT = *LOCAL-PRINT-JOBS / *DISTRIBUTED-PRINT-JOBS / *BY-ATTRIBUTES(...)
Specifies whether the number of print jobs to be transferred is to be restricted.
SELECT = *LOCAL-PRINT-JOBS
All local print jobs are transferred (corresponds to the specification SELECT=*ALL which is still supported for reasons of compatibility).
SELECT = *DISTRIBUTED-PRINT-JOBS
All local print jobs are transferred (see the notes on usage below).
SELECT = *BY-ATTRIBUTES(...)
Only the print jobs with the specified selection attributes are transferred.
RESOURCES-PUBSET = *ANY / list-poss(128): <cat-id 1..4>
Specifies whether the pubset with the required resources is the selection attribute.
RESOURCES-PUBSET = *ANY
The print jobs are selected regardless of the pubset on which the required resources are located. The following resources are considered when selecting local print jobs (specified with the PRINT-DOCUMENT command):
file to be printed (FROM-FILE operand)
job variable monitoring the job (MONJV operand, if specified)
file with the user resources (USER-RESOURCES-FILE operand, if specified)
translation table (TRANSLATION-TABLE operand, if specified)
In the case of distributed print jobs under BS2000 where client = server, the monitoring job variable and the user resource file are taken into account as resources (if specified).
RESOURCES-PUBSET = list-poss(128): <cat-id 1..4>
Only print jobs with the required resources on the specified pubset are selected. As many as 128 pubsets can be included in a list. If more than 128 pubsets are to be considered the MOVE-PRINT-JOBS command will have to be issued again for the remaining pubsets.
JOB-TYPE = *ANY / list-poss(3): *WAIT / *ACTIVE / *KEEP
Specifies whether the job status is to be a selection attribute. Several statuses may be given in a list (OR operation).
JOB-TYPE = *ANY
The print jobs are selected regardless of their status.
JOB-TYPE = *WAIT
The jobs that are waiting for a printer are selected. Their status may be WT (wait) or WP (wait-pre-processing).
JOB-TYPE = *ACTIVE
The jobs which have had a printer assigned to them are selected. Their status may be ACT (active), TRT (before-apa-print), TRD (after-apa-print) or PRE (pre-processing).
Selecting active jobs makes sense when you want to move print jobs from an EQUISAMQ file of a system that has failed into the EQUISAMQ file of a functioning system. If there is no system failure, active jobs cannot be accessed.
JOB-TYPE = *KEEP
Jobs that were put on hold are selected (e.g. with the HOLD-PRINT-JOB command). Their status is KP (keep).
JOB-SCOPE = *ANY / list-poss(2): *LOCAL-PRINT-JOBS / *DISTRIBUTED-PRINT-JOBS
Specifies whether local (*LOCAL-PRINT-JOBS) or distributed (*DISTRIBUTED-PRINT-JOBS) print jobs are to be selected. The default value is *ANY, i.e. both local and distributed print jobs are selected. Both types of print job can be specified in a list (OR operator).
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | No error | |
32 | SPA0101 | System error | |
64 | CMD0216 | No authorization | |
64 | CMD2201 | Parameter error | |
64 | SPA0102 | Command execution terminated abnormally | |
64 | SPA0103 | Command has already been executed by another task |
Notes
The MOVE-PRINT-JOBS command is rejected if you try to access the current EQUISAMQ file if the SPOOL subsystem is in the status IN-CREATE, IN-HOLD, IN-RESUME or IN-DELETE. This behavior is preset in the initialization file of the SPOOLSYS subsystem:
MOVE.SPOOL.REQUEST=ABORT-REQUEST
If the parameter value is changed into WAIT-SPOOL, command execution will not begin until the SPOOL subsystem is in the state CREATED or NOT-CREATED.
While a MOVE-PRINT-JOBS command which accesses the current EQUISAMQ file is being processed, the START-, HOLD-, RESUME- and STOP-SUBSYSTEM commands are rejected for the SPOOL subsystem. This behavior is preset in the initialization file of the SPOOL subsystem:
MOVE.SPOOL.REQUEST=ABORT-REQUEST
If the parameter value is changed into WAIT-MOVE, command execution will not begin until the MOVE-PRINT-JOBS command has been concluded.
While a MOVE-PRINT-JOBS command is being executed any other MOVE-PRINT-JOBS command is rejected. This behavior is preset in the initialization file of the SPOOLSYS subsystem:
MOVE.COMMAND=ABORT-REQUEST
If the parameter value is changed into WAIT-REQUEST, command execution of a further MOVE-PRINT-JOBS command will be started, when the currently active command execution routine is concluded.
If the print jobs are output independent of the pubset on which the required resources are located, it is also possible to select print jobs that require resources on the home pubset. They can only be printed in another system if the pubset has been imported on that system. If this is not the case, the print jobs are rejected (status KP).
Print jobs that have been successfully transferred to the destination file are deleted from the original file.
RSO print jobs that were transferred into the current EQUISAMQ file are only visible if the RSO subsystem has been loaded.
Print jobs whose TSN is already in use in the destination file, are assigned a new TSN. The relevant information is issued to the console.
When a print job has been transferred to the destination file the job variable that is monitoring the job will be updated. The new TSN and the status of the print job (as established on the output device) are entered. The other fields remain unchanged.
Print jobs with the same TSN (one PRINT-DOCUMENT command for several files with FAMILY-PROCESSING=*YES) are split up in the transfer process, i.e. n-1 elements of the job all receive a TSN of their own.
Active print jobs that are transferred (after a system crash), are returned to the wait state. The other jobs retain their respective states.
Print jobs that request a file lock ( LOCK-FILE operand in the PRINT-DOCUMENT or MODIFY-PRINT-JOB-ATTRIBUTES command) are ignored when jobs are being transferred from a work file into the current EQUISAMQ file, if the file lock cannot be set (e.g. the file no longer exists or the pubset cannot be accessed).
Special characteristics of distributed print jobs
- If the TSN of a print job already refers to another task or another print job on the remote system to which it was moved with the MOVE-PRINT-JOBS command, this print job is assigned a new TSN, and a console message (SPA0105) is issued. In addition, this second print job (on the target system) is set with message SPA0117 to “not schedulable”, i.e. stopped, in the following cases:
- if the print job to be moved is a distributed print job on different clusters, with gateway = server
- if the TSN of the print job matches the TSN of a distributed print job (not client = server) on the target system
- if the SPOOL subsystem is not loaded.
The user ID of virtual printer server tasks should be defined under a (selectable or shared) pubset which is not the home pubset in order to facilitate the administration of the user ID within HIPLEX (provided that the HIPLEX function is available).