ctmudchk

The ctmudchk utility checks if all jobs that should have been ordered by a User Daily name job are in the Active Jobs database.

This utility facilitates recovery from the interruption of a User Daily job. If a User Daily job is interrupted for any reason, such as an operating system crash, the ctmudchk utility can determine which jobs in the affected user daily ended okay, which jobs had interruptions, and which jobs had not yet run. You can examine the outputs and logs related to the jobs that were in process to decide what to do, but the utility can reorder the jobs that did not yet run.

If ctmudchk is executed before the order is complete by a User daily Name (ctmudly), ctmudchk will wait for the order to complete. By default, it will wait up to 200 seconds. If the wait time had passed, the ctmudchk exits with return code 1. The wait time can be configured by adding and setting the CTMUDCHK_RETRIES and CTMUDCHK_RETRIES_WAIT parameters, as described in Utility parameters.

Return Code

Description

0

Success

1

User daily Name (ctmudly) is currently running.

2

Cannot determine if the User daily Name (ctmudly) is currently running, because ctmudchk did not receive any response from the Control-M/Server CE process (APIGTW).

Other

Failure

Before ordering the job, ctmudchk verifies that a job is not already present in the Active Jobs database. When using the ctmudchk utility, the New Day procedure must not be running.

To handle an interruption in User Daily processing, run the ctmudchk utility for the affected User Daily to order jobs that were not ordered because of the interruption.

Checking and Ordering Jobs Using the ctmudchk Utility

This procedure describes how to run the ctmudchk utility, which enables you to check and/or order jobs that should have been ordered by the User Daily name are in the Active Jobs database.

Begin

  1. Do one of the following:

    • UNIX: Log in to a Control-M/Server account.

    • Windows: Open a command prompt window where Control-M/Server is installed.

  2. Type the following command:

    ctmudchk

    -DAILY <user daily name>

    -ACTION <LIST|ORDER>

    [ -ODATE <scheduling date> ]

    [ -ODATE_OPTION <VALUE_DATE|RUN_DATE> ]

    [ -FILE <file name> ]

  3. Check return codes.

    The utility returns code 1 status—NOTOK—if it attempts to order a job, but fails to do so. Otherwise, the utility returns code 0—OK.

For more information on ctmudchk parameters, see ctmudchk parameters.

ctmudchk Parameters

The following table lists the ctmudchk utility parameters:

Parameter

Description

-DAILY

Defines the name of the User Daily to be checked.

For more information, see User Daily name.

-ACTION

Indicates whether jobs that are missing from the Active Jobs database should be listed or ordered.

The following values can be specified for this parameter:

  • LIST: Lists the job name and the name of the folder for each missing job.

  • ORDER: Orders the missing jobs.

-odate

Indicates the scheduling date (odate) to be associated with jobs that are ordered by this user daily job.

Valid values:

  • ODAT: The current working date of the computer on which Control‑M/Server is running.

  • yyyymmdd: A specific working day in yyyymmdd format.

    Default: ODAT

The interpretation of this parameter value is dependent on the value specified for the -odate_option parameter (described below).

-odate_option

Indicates how the specified -odate value should be used.

Valid values:

  • value_date: The specified odate is the odate value for the jobs. However, the jobs ordered by the user daily job should be run during the current working day.

    This is the default value for the ‑odate_option parameter.

    If time zones specified in specific job processing definitions in the folders, then the jobs are run according to those time zones.

  • run_date: The jobs ordered by the user daily job should be run only when the specified odate begins.

    • If the specified odate is the current working day, then this will work in the same way as value_date (described above).

    • If the specified odate has not begun (for example, due to time zone specifications), then the job will wait in the Active Jobs database (with WAIT_ODAT status) until the start of the specified working day.

    • If the specified odate has already passed, the ctmudchk utility will not run, and an error message will be displayed.

-FILE

Indicates the path name for the output of the ctmudchk utility. This parameter is required only if LIST is specified for the ACTION parameter.

ctmudchk Examples

The following are examples of ctmudchk utility commands:

  • Use the following command to check Active Jobs database for jobs that are ordered by the User Daily name, payroll. The Job Name and Folder are listed for each job that is not in the Active Jobs database.

    ctmudchk -DAILY payroll -ACTION LIST

  • Use the following command to check the Active Jobs database for jobs that are ordered by the User Daily name, admin1. The utility orders each job that is not in the Active Jobs database.

    ctmudchk -DAILY admin1 -ACTION ORDER