TFRJOB (Transfer Job)
Purpose
The Transfer Job (TFRJOB) command transfers a job to the specified job queue that is run in the subsystem in which that queue is active. The job that is transferred is the one in which this TFRJOB command is issued. The specified job queue is normally in a different subsystem than the one in which the job is currently. If the job being transferred is an interactive job, it is given the highest priority on the job queue. New routing data and request data can be specified for the job when it is transferred. If objects that were allocated to the previous routing step or files that were open in the previous routing step are needed in the new routing step, they must be allocated or opened again.
Note: Running this command in a batch job causes loss of spooled inline files because they cannot be accessed in the new routing step. If the target subsystem is ended (by running the End Subsystem (ENDSBS) command, the End System (ENDSYS) command, or the Power Down System (PWRDWNSYS) command) while an interactive transferring job is on a job queue, the job is canceled as part of subsystem ending.
Because a Power Down System (PWRDWNSYS) command inhibits new jobs or routing steps from being started by any subsystem, a batch job transferred to a job queue (by the TFRJOB command) is not completed before the system is powered down. The temporary objects associated with a transferring job (such as the library list, the QTEMP library, and all objects in it) are destroyed during the PWRDWNSYS command, so that during a re-initial program load (IPL), the system is unable to restore the job to its previous state. During re-IPL, the system removes the job from the job queue and produces its job log.
Restrictions: The user must have read and add authority for the job queue and for the subsystem to which the job queue is allocated. If the job being transferred is an interactive job, the following restrictions apply:
- The job queue on which the job is placed must be associated with an active subsystem.
- The work station associated with the job must have a corresponding work station entry in the subsystem description associated with the new subsystem.
- The work station associated with the job must not have another job associated with it that has been suspended by means of the Sys Req (system request) key. The suspended job must be canceled before the Transfer Job command can be run.
- The job must not be a group job.
- The job must not be a communications batch job (started as a result of a program start request), unless it meets one of the following criteria:
- It was started from an APPC communications device
- The session on the communications device has ended
Required Parameters
- JOBQ
- Specifies the qualified name of the job queue to which the job is transferred.
The name of the queue can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
job-queue-name: Specify the name of the job queue to which the job is transferred.
Optional Parameters
- RTGDTA
- Specifies the routing data used with this job description to start jobs. The routing data is used to determine the routing entry (in the subsystem description) that identifies the program in which the job runs.
QCMDI: This routing data matches a routing entry in the IBM-supplied QINTER subsystem description, which starts a routing step processed by the IBM-supplied control language processor, QCMD, in the QSYS library.
*RQSDTA: Up to 80 characters of the request data, specified in the RQSDTA parameter of this command, are also used as the routing data for the routing step.
'routing-data': Specify the character string that is used as the routing data for starting the routing step. Up of 80 characters can be entered, enclosed in apostrophes, if necessary.
- RQSDTA
- Specifies the request data that is added to the end of the job's message queue for use by the new routing step.
*NONE: No request data is placed in the job's message queue.
*RTGDTA: The routing data specified in the RTGDTA parameter is also placed at the end of the job's message queue.
'request-data': Specify the character string that is placed at the end of the job's message queue for use by the new routing step or some subsequent routing step in the job. Up to 256 characters can be entered, enclosed in apostrophes, if necessary. When a CL command is entered, it must be enclosed in single apostrophes, and where apostrophes would normally be used inside the command, double apostrophes must be used instead.
Example for TFRJOB
TFRJOB JOBQ(QSYS/QCTL) RTGDTA(APPLICS)This command transfers the job in which the command is entered to the QSYS job queue in the QGPL library. The job is routed using the routing data APPLICS. If the job is an interactive job, the job queue must be allocated by an active subsystem.
Error messages for TFRJOB
*ESCAPE Messages
- CPF1289
- Transfer job is not allowed.
- CPF1315
- Command &1 not allowed in this environment.
- CPF1357
- Job not transferred.
- CPF1364
- Job not transferred. Job queue &1 in library &2 not active.
- CPF1365
- Job not transferred. Subsystem &1 ending.
- CPF1366
- Subsystem &1 has no usable work station entry for &2.
- CPF1367
- User &1 not authorized to subsystem &2
- CPF1368
- &1 not authorized to job queue &2 in library &3.
- CPF1369
- Job queue &1 in &2 not found.
- CPF1370
- Job queue &1 in &2 not accessible.
- CPF1372
- Job not transferred. Job currently being ended.
- CPF1373
- Job not transferred. System request in effect for job.
- CPF1375
- Job not transferred. Single active device not allowed to transfer.