rerun

Reruns a job.

You must have rerun access to the job.

To use streamlogon|logon, docommand, or script arguments, you must have submit access to the job.

To use the from argument, you must have submitdb access to the job.

Syntax

{rerun | rr} jobselect
     [[;from=[[folder/]wkstat#]job
     [;at=time]
     [;pri=pri]] |
     [[;streamlogon|logon=new_logon]
     [;docommand="new_command"|;script="new_script"]] |
     [;step=step]]
     [;sameworkstation=]
     [;noask]

Arguments

jobselect
See Selecting jobs in commands. Wildcards are supported.
from=[[folder/]wkstat#]job
Specifies the name of a job defined in the database whose job file or command will be run in place of the job specified by jobselect. You can rerun jobs also in the SUPPR state, as long as they do not belong to job streams that are in the cancelled or suppressed state.
wkstat#
Specifies the name of the workstation on which the from job runs. The default is the workstation on which conman is running.
job
Specifies the name of the from job definition The following types of job names are not permitted:
  • The names of jobs submitted using the submit file and submit docommand commands.
  • The alias names of jobs submitted using the submit job command.

This argument is mutually exclusive with streamlogon|logon and docommand|script arguments.

The recovery options, if any, are partly inherited from the original job definition and partly retrieved from the from job. Recovery options retrieval criteria describes the criteria by which recovery options in the original and from job definition are retrieved.
Table 1. Recovery options retrieval criteria
recovery option Inherited from original job Retrieved from "from" job
stop No Yes
continue No Yes
rerun Yes No
repeatevery Yes No
for Yes No
after Yes No
abendprompt Yes No

To use the from argument, you must have access to the database from the computer on which you are running conman

at=time
Specifies the rerun job's start time, expressed as follows:

hhmm [timezone|tz tzname] [+n days | date]

where:

hhmm
The hour and minute.
+n days
The next occurrence of hhmm in n number of days.
date
The next occurrence of hhmm on date, expressed as mm/dd[/yy].
timezone|tz tzname
The name of the time zone of the job. See Managing time zones for valid names.
pri=pri
Specifies the priority to be assigned to the rerun job. If you do not specify a priority, the job is given the same priority as the original job.
sameworkstation
If the parent job ran on a workstation that is part of a pool or a dynamic pool, you can decide whether it must rerun on the same workstation or on a different one. This is because the workload on pools and dynamic pools is assigned dynamically based on a number of criteria and the job might be rerun on a different workstation.

When you rerun the job manually, the sameworkstation setting you define with the rerun command is applied only to the instance you rerun, and is ignored in any subsequent reruns of that instance. For example, also if the job you rerun already contains rerun information (defined with the rerun, repeatevery, and for arguments in the job definition) the sameworkstation setting you define with the rerun command applies only to the specific instance you rerun. For the subsequent reruns, the setting defined in the job definition is used. For more information about arguments in the job definition, see Job definition.

step=step
Specifies that the job is rerun using this name in place of the original job name. See Comments for more information.
streamlogon|logon=new_logon
Specifies that the job is rerun under a new user name in place of the original user name. This argument applies only to completed jobs. This argument is mutually exclusive with the from argument.
docommand="new_command"
Specifies the new command that the rerun job runs in place of the original command. This argument is mutually exclusive with the script and from arguments. This argument applies only to completed jobs.
script="new_script"
Specifies the new script that the rerun job runs in place of the original script. This argument is mutually exclusive with the docommand and from arguments. This argument applies only to completed jobs.
noask
Specifies not to prompt for confirmation before taking action on each qualifying job.

Comments

You can rerun jobs that are in the SUCC, FAIL, or ABEND state. A rerun job is placed in the same job stream as the original job, and inherits the original job's dependencies. If you rerun a repetitive (every) job, the rerun job is scheduled to run at the same rate as the original job.

Note: You can issue rerun for jobs in the EXTERNAL job stream that are in the ERROR state. Jobs in the EXTERNAL job stream represent jobs and job streams that have been specified as internetwork dependencies. The job state is initially set to extrn immediately after a rerun is run, and conman begins checking the state.
Note: When you rerun a job using docommand, or script arguments, if the job contains variables, the job reruns and completes, but is unable to resolve the variables with their value.

When ;from is used, the name of the rerun job depends on the value of the Global Option enRetainNameOnRerunFrom. If the option is set to Y, rerun jobs retain the original job names. If the option is set to N, rerun jobs are given the from job names. For more information, see Global options - summary.

In conman displays, rerun jobs are displayed with the notation >>rerun as. To refer to a rerun job in another command, such as altpri, you must use the original job name.

When a job is rerun with the ;step option, the job runs with step in place of its original name. Within a job script, you can use the jobinfo command to return the job name and to run the script differently for each iteration. For example, in the following UNIX® script, the jobinfo command is used to set a variable named STEP to the name that was used to run the job. The STEP variable is then used to determine how the script is run.
...
MPATH=ˋmaestroˋ
STEP=ˋ$MPATH/bin/jobinfo job_nameˋ
if [$STEP = JOB3]
  then
  ...
  STEP=JSTEP1
  fi
if [$STEP = JSTEP1]
  then
  ...
  STEP=JSTEP2
  fi
if [$STEP = JSTEP2]
  then
  ...
  fi
...

In conman displays, jobs rerun with the ;step option are displayed with the notation >>rerun step.

For information about jobinfo, see jobinfo.

Examples

To rerun job job4 in job stream sked1 on workstation main, run the following command:
rr main#sked1.job4
To rerun job job5 in job stream sked2 using the job definition for job jobx where the job's at time is set to 6:30 p.m. and its priority is set to 25, run the following command:
rr sked2.job5;from=jobx;at=1830;pri=25
To rerun job job3 in job stream sked4 using the job name jstep2, run the following command:
rr sked4.job3;step=jstep2

See also

From the Dynamic Workload Console you can perform the same task as follows:
  1. In the Welcome page, select Monitor your workload, or in the navigation bar at the top of the page, click Monitoring & Reporting > Workload Monitoring > Monitor Workload.
  2. Select an engine.
  3. In Object Type, select Job.
  4. From the Query drop-down list, select All Jobs in plan or another task to monitor jobs.
  5. Click Run to run the monitoring task.
  6. From the table containing the list of jobs, select a job and click Rerun....