TFRBCHJOB (Transfer Batch Job)

TFRBCHJOB Command syntax diagram

 

Purpose

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 TFRBCHJOB 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 is placed after all other request data for the job. The transferred batch job resumes running the request data immediately following the TFRBCHJOB command.

If the TFRBCHJOB command is issued in a CL program, all subsequent commands in the CL program are bypassed. If objects that are allocated to the current routing step or files that are open in the current routing step are needed in the new routing step, they must be allocated or opened again after the new routing step has been started.

Note: If you are working in a System/36 environment, the TFRBCHJOB command does not transfer the System/36 environment to the new job.

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; the job's temporary objects exist through a power down. A batch job's temporary objects are destroyed during the power down if the job was transferred by the Transfer Job (TFRJOB) command.

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.

Restrictions: (1) The user must have add and read authority for the job queue and operational authority for the subsystem to which the job queue is allocated. (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. Also, interactive, auto-start, reader, writer, and system jobs cannot be transferred by the TFRBCHJOB command.

 

Required Parameters

JOBQ
Specifies the qualified name of the job queue to which the batch 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 batch 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 where 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: Up to 80 characters of the request data specified in the RQSDTA parameter of this command are used as the routing data for the routing step. If this value is used, RQSDTA(*RTGDTA or *NONE) cannot be specified.

'routing-data': Specify the character string that is used as the routing data for starting the routing step. Up to 80 characters can be specified, enclosed in apostrophes if blanks or special characters are included.

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 placed at the end of the job's message queue. If this value is used, RTGDTA(*RQSDTA) cannot be specified.

'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 specified, enclosed in apostrophes if blanks or special characters are included. When a CL command is specified, it must be enclosed in single apostrophes, and where apostrophes would normally be used in the command, double apostrophes must be used.

Example for TFRBCHJOB

TFRBCHJOB  JOBQ(QGPL/QCTL)  RTGDTA(APPLICS)

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

Error messages for TFRBCHJOB

*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.
CPF1376
Library on library search list deleted.
CPF1377
Library on library search list damaged.