cancel job

You can use the cancel job command to cancel a task.

Overview

If you cancel a task before it is launched, the task is not launched. When you attempt to cancel a task after it is launched, it continues to run.

To run the cancel command, you must have cancel access to the task.

Note: If you cancel a task in status successful and internal status SUCC, the task status becomes canceled and the internal status remains SUCC.

Syntax and command line options

Before you run the command, you must give the details of the command line options. The pend and noask command line parameters are optional. This allows you to complete a command by using only the jobselect paramter. You can create the command as follows:

ocli plan cancel job | cj jobselect [;pend] [;noask]

You can add the pend option to resolve the dependencies associated with the task before the task is canceled. The details that are required with each parameters are as follows:

jobselect

Specify the task to update, by using attributes and qualifiers.

For example, enter the following command WA_AGT_0#WORKFLOW.TASK.

pend
You can use the pend option to remove dependencies that are associated with the task to cancel. If you do not use the pend option, tasks and workflows that are dependent on the cancelled task are released immediately from the dependency. The different scenarios related to the pend option are listed in the following table.
Action Task status Result
pend added Not started The task is not canceled until all associated dependencies are resolved. After the task is canceled, the tasks and workflows that are related to the cancelled task are removed from the dependencies.
Note: While the cancel action is postponed, the notation Cancel Pend is listed in the Dependencies column of the task in a showjobs display.
pend added started The option is ignored and tasks or workflows that are related to the canceled task are removed from the dependencies.
Notes:
  1. You can use the rerun command to rerun canceled tasks, or tasks that are marked as [Cancel Pend]. You can also add and delete dependencies on tasks that are marked [Cancel Pend].
  2. You can immediately cancel a task that is marked as [Cancel Pend], either enter a release command for the task or enter another cancel command without the pend option.
  3. For tasks with an expired until parameter, the notation Until is listed in the Dependencies column in a showjobs display, and their dependencies are no longer evaluated. If such a task is also marked [Cancel Pend], it is not canceled until you release or delete the until time, or enter another cancel command without the pend option.
  4. If you cancel pending a task in status successful and internal status SUCC, the task status becomes canceled and the internal status remains SUCC.

noask

When you add the noask option as an argument, the agent does not ask for confirmation before it acts on each qualifying item.

Examples

  1. To cancel a task report in the dsrtfe(0801 04/11/04) workflow on stat4 workstation, run the following command:
    ocli plan cj=stat4#dsrtfe(0801 04/11/04).report
  2. To cancel a task setup in the sri4(1000 05/12/08) workflow, if it is not in the ABEND state, run the following command:
    ocli plan cj sri4(1000 05/12/08).setup~state=abend
  3. To cancel the task6 task in the sched4(0700 04/11/06) workflows only after its dependencies are resolved, run the following command:
    ocli plan cj sched4(0700 04/11/06).task3;pend