ctmkilljob

The ctmkilljob utility terminates a specified Control‑M job that is currently executing and all its processes. This utility can only be run interactively.

The ctmkilljob utility fails if the Agent is upgrading.

The ctmkilljob utility can be invoked using the -input_file parameter:

ctmkilljob -input_file <fullPathFileName>

The referenced file contains all the required parameters.

If the action performed by the ctmkilljob utility was successful, the utility responds with the statement:

Job was killed

The specified job is ended with NOTOK status.

The parameters specified for ctmkilljob must indicate one unique job. If more than one job fits the description specified in the command, you are informed that a unique name must be entered to carry out the action. Reenter the command with parameters that specify one unique job.

Ending a job using the ctmkilljob utility

This procedure describes how to terminate a specified Control‑M job and all its processes using the ctmkilljob utility.

Begin

  1. From an Agent, type one of the following commands:

    • ctmkilljob

      [ -ORDERID <uniqueOrderID> ]

      [ -HOSTID <hostID> ]

      [ -FILE_PATH <path> ]

      [ -FILE_NAME <filename> ]

      [ -JOBNAME <jobName> ]

    • ctmkilljob -input_file <fullPathFileName>

ctmkilljob Parameters

The following table lists the ctmkilljob utility parameters:

Parameter

Description

-ORDERID

Defines the Control‑M Order ID of the job to be terminated.

-HOSTID

Defines the Host name of an Agent computer, or name of a host group to submit the job.

-FILE_PATH

Defines the name of the library/directory where the job script resides.

-FILE_NAME

Defines the name of the file that contains the job script statements.

-JOBNAME

Describes a job processing definition.

-input_file

Defines the name and full path of a file containing parameters for the utility.

In this file, each parameter and its values are on a separate line with the same syntax they would have on the command line.

Using the -input_file parameter enables you to:

  • prepare and save files of utility parameters that can be reused.

  • specify utility input longer than the number of characters allowed in the command line.

-input_file ~<controlm_owner>/ctm/data/ctmkilljob_parms.txt