cancel sched

You can use the cancel sched command to cancel a job stream.

Overview

If you cancel a job stream before it starts, the job stream does not run. If you attempt to cancel a job stream after it starts, the jobs in the stream that are started will complete. The remaining jobs from the job stream are canceled. To run the cancel command, you must have the cancel access to the job.

Syntax and command line options

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

ocli plan cancel sched | cs jstreamselect [;pend] [;noask]

You can add the pend option to resolve dependencies associated with the job before you cancel the job. The details that are required with each parameters are as follows:

jstreamselect

Specify the job stream to update, by means of attributes and qualifiers.

pend
You can use the pend option to remove the dependencies that are associated with the job stream that you plan to cancel. If you do not use the pend option, jobs and job streams that are dependent on the canceled job are released immediately from the dependency. The different scenarios that are related to the pend option are described in the following table.
Action Job stream status Result
pend added Not launched The job stream is not canceled until all associated dependencies are resolved. After the job stream is cancelled, the jobs and job streams that are related to the cancelled job stream are removed from the dependencies.
Note: While the cancel action is postponed, a Cancel Pend notice is listed in the Dependencies column of the related job in a showschedules display.
pend added Launched The jobs that are not started are canceled and related jobs or job streams that are related are removed from the dependencies.
Notes:
  1. You can immediately cancel a job stream that is marked as [Cancel Pend] by either entering a release command for the job stream or entering another cancel command without the pend option.
  2. If the canceled job stream contains jobs defined with the every option, only the last instance of such jobs is listed as canceled in a showjobs display.
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 the sched2(1100 04/12/07) job stream on stat2 workstation, run the following command:
    ocli plan cs=stat2#sched2(1100 04/12/07)
  2. To cancel the mas3(0700 08/11/10) job stream when it is in the STUCK state, run the following command:
    ocli plan cs mas3(0700 08/11/10)+state=stuck