Reroute Job (RRTJOB)

The Reroute Job (RRTJOB) command starts a new routing step for a job in the current subsystem. The rerouting allows changes in the routing data for the job, and calls a different program used with the new routing step. A job can use rerouting in order to run under a different class or in a different storage pool. When this command is used, any objects allocated in the previous routing step are deallocated and any open files are closed. If the objects or files are needed in the new routing step, they must be allocated or opened again.

Notes:

  1. Running of this command in a batch job causes loss of spooled inline files because they cannot be accessed in the new routing step.
  2. if the RRTJOB command is run while the system is ending (by running of a End Subsystem (ENDSBS) command, End System (ENDSYS) command, or the Power Down System (PWRDWNSYS) command), a new routing step is not started and the job is ended.
  3. If the RRTJOB command is issued in a CL program, all subsequent commands in the CL program are bypassed.

Restrictions:

  1. The job must not be a group job, prestart job, batch immediate job, or a batch job in restricted state.

Parameters

Keyword Description Choices Notes
RTGDTA Routing data Character value, QCMDI, *RQSDTA Optional, Positional 1
RQSDTA Request data or command Character value, *NONE, *RTGDTA Optional, Positional 2

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.

QCMDI
This routing data matches a routing entry in the IBM-supplied subsystem description, QINTER, which indicates a routing step that is processed by the IBM-supplied control language processor, QCMD, in the QSYS library.
*RQSDTA
The first 80 characters of the request data specified in the Request data or command (RQSDTA) parameter of this command is also used as the routing data for the next routing step.
character-value
Specify the character string used as the routing data for starting the next routing step. A maximum of 80 characters can be entered, enclosed in apostrophes if necessary.

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 also placed at the end of the job's message queue.
character-value
Specify the character string 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.

Examples

RRTJOB   RTGDTA(INQUIRY)

This command reroutes the job in which the command is issued by starting a new routing step with the routing data INQUIRY. The job remains in the same subsystem.

Error messages

*ESCAPE Messages

CPF1315
Command &1 not allowed in this environment.