Transfer Batch Job (TFRBCHJOB)

Where allowed to run:
  • Batch job (*BATCH)
  • Batch program (*BPGM)
  • Batch REXX procedure (*BREXX)
  • Using QCMDEXEC, QCAEXEC, or QCAPCMD API (*EXEC)
Threadsafe: No
Parameters
Examples
Error messages

The Transfer Batch Job (TFRBCHJOB) command transfers a batch job to the specified job queue. The job queue does not have to be allocated to an active subsystem at the time of the batch job transfer. The batch job that is transferred is the one in which this command is issued. Routing data and request data can be specified for the batch job when it is transferred. The routing data specified is processed in the subsystem in which the job queue is active. The request data follows other request data for the job. The transferred batch job resumes running the request data following the transfer.

Restrictions:

  1. To use this command, you must have:
    • use (*USE) authority to the job queue and execute (*EXECUTE) authority to the library that contains that job queue.
  2. The job being transferred must be a batch job that started from a job queue.
  3. The TFRBCHJOB command is not allowed to run in a batch communications job (a batch job that was started as the result of a program start request) or a batch immediate job.

Notes:

  1. Running this command causes loss of spooled inline files because they cannot be accessed in the new routing step.
  2. If you are working in a System/36 environment, the TFRBCHJOB command does not transfer the System/36 environment to the new routing step.
  3. If objects allocated to the previous routing step, are needed in the new routing step, they must be allocated again. If files opened in the previous routing step, are needed in the new routing step, they must be opened again.
  4. If the TFRBCHJOB command is issued in a CL program, all subsequent commands in the CL program are bypassed.
  5. A batch job transferred to a job queue by the TFRBCHJOB command exists through an initial program load (IPL) if the batch job was residing on the job queue at the time the system was powered down. A batch job's temporary objects are destroyed during the power down.
  6. The QTEMP library of a batch job that has been transferred by the TFRBCHJOB command is always empty when the next routing step is started. Caution must be used with the library list in conjunction with a batch job that was transferred to a job queue by the TFRBCHJOB command. The TFRBCHJOB function saves the library list to recover the job on a job queue if an IPL occurs. When the routing step for the transferred batch job is started, the libraries in the saved library list must exist in the system or the job's routing step ends.
Top

Parameters

Keyword Description Choices Notes
JOBQ Job queue Qualified object name Required, Positional 1
Qualifier 1: Job queue Name
Qualifier 2: Library Name, *LIBL, *CURLIB
RTGDTA Routing data Character value, QCMDB, *RQSDTA Optional
RQSDTA Request data or command Character value, *NONE, *RTGDTA Optional
Top

Job queue (JOBQ)

Specifies the qualified name of the job queue to which the job is transferred.

This is a required parameter.

Qualifier 1: Job queue

name
Specify the name of the job queue.

Qualifier 2: Library

*LIBL
All libraries in the thread's library list are searched until a match is found.
*CURLIB
The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the library where the job queue is located.
Top

Routing data (RTGDTA)

Specifies the routing data used to start the next routing step in the job. The routing data is used to determine the routing entry that identifies the program that the job runs.

QCMDB
This routing data matches a routing entry in the IBM-supplied subsystem description, which starts a routing step processed by the IBM-supplied control language processor QCMD.
*RQSDTA
The first 80 characters of the request data specified in the RQSDTA parameter of this command are used as the routing data for the routing step.
character-value
Specify the character string that is used as the routing data for starting the routing step. A maximum of 80 characters can be entered, enclosed in apostrophes if necessary.
Top

Request data or command (RQSDTA)

Specifies the request data that is placed as the last entry in this job's message queue. The request data can be a CL command to be run or a string of characters used by another program.

*NONE
No request data is placed in the job's message queue.
*RTGDTA
The routing data specified in the Routing data (RTGDTA) parameter is placed at the end of the job's message queue.
character-value
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. A maximum of 256 characters can be entered, enclosed in apostrophes if necessary.
Top

Examples

TFRBCHJOB   JOBQ(QGPL/APPLICQ)  RTGDTA(APPLICS)

This command transfers the batch job in which the command is entered to the APPLICQ job queue that is in the QGPL library. The job is routed using the routing data APPLICS. The job must be a batch job.

Top

Error messages

*ESCAPE Messages

CPF1288
Job queue &1 in library &2 damaged.
CPF1289
Transfer job is not allowed.
CPF1291
Job &3/&2/&1 cannot be transferred.
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.
CPF1375
Job not transferred. Single active job not allowed to transfer.
CPF1376
Library on library search list deleted.
CPF1377
Library on library search list damaged.
Top