Previous Topic

Next Topic

Book Contents

Book Index

In Condition

Specifies prerequisite conditions that must be satisfied before the job is submitted for execution. The In Conditions parameter makes the submission of the job dependent on the existence of one or more prerequisite conditions.

NOTE: A maximum of 99 prerequisite conditions can be specified for the In Condition parameter.

Additional information

Description

Usage

Optional

Format

The In Condition parameter is composed of the Condition Name, Date, and Condition Relationships sub-parameters.

Variable Name

Yes. Variable system variables (but not other types of variables) can be specified as the entire value for this parameter.

Alternate names

  • Control‑M/EM Utilities: INCOND
  • Control-M Report: CONDITION
  • Control‑M/Server Utilities: ‑incond
  • Control‑M for z/OS: IN
  • Control‑M/EM API: in_condition

Alternate formats

Control‑M/EM Utilities

INCOND is composed of the NAME. ODATE, AND_OR, and OP sub-parameters. The OP value is a right or left parenthesis. Used to isolate portions of the In condition expression.

Control‑M/EM Utilities continued

<INCOND NAME="Cond1" ODATE="ODAT" AND_OR="AND" OP=")">

Control-M Report

Condition name

Control‑M for z/OS

Each specified prerequisite condition consists of the mandatory cond_name and dateref sub-parameters.

Logical relationships between conditions

The logical relationship (And/Or) used when two or more prerequisite conditions are specified determines whether all or only some of the prerequisite conditions must exist in order for the job to be submitted.

Time stamp

NOTE: Not relevant in z/OS environments.

Inserting the @HHMMSS code into an In condition name includes a time stamp (in hours, minutes, and seconds) that is resolved to the time that the job is entered in the Active Jobs database.

Future and past dates

You can use the Days Offset field to set a future or past date for an In condition. Valid values for this field are a + (plus) or - (minus) sign, followed by a number from 0 through 999. The value in the field represents the number of days in the future, or in the past, relative to the actual order date.

EXAMPLE: Schedule a job that depends on the successful completion of another job

Schedule JOB_B to execute after the successful completion of JOB_A (regardless on what day JOB_A was run):

Daily jobs

JOB_A and JOB_B are daily jobs. JOB_B should be submitted only after the successful completion of JOB_A. JOB_B must not be mistakenly submitted based on the successful completion of JOB_A from a previous day.

Schedule a job that depends on the completion of multiple jobs

Schedule the job that produces the salary statistics report for top management after the set of jobs that calculates the salaries ends OK:

Maintain order of job runs

Assume a group of jobs runs every day of the week, except Saturday and Sunday. It is very important that some of the jobs scheduled for the various days of the week do not run in parallel. The order of these jobs must be maintained even in cases of delays:

Job scheduling that depends on site conditions

Suppose a Database master data set exists, and that it is accessed by many programs. Unfortunately, the contents of the Database are often destroyed or damaged because of bugs in old programs. When, and if, it is discovered that the contents of the Database are corrupted, submission of all the jobs that access the file must be prevented:

Job scheduling when a failure has occurred

A detached process, LOGCLOSE, is to begin whenever a certain communication process crashes because of a boot operation, or as a result of an operator’s cancelation:

Date reference

The following example provides a further explanation of the concept of the scheduling date reference:

Condition including terms isolated with parentheses

ctmcreate -tasktype command -cmdline ls -jobname cond_600 -incond cond_21 ODAT AND -incond '('cond_22 ODAT OR -incond cond_23')' ODAT AND -incond cond_24 ODAT OR

Out condition name including a time stamp

ctmdefine -tasktype command -cmdline date -application app -sub_application grp -folder time_cond -days ALL -month ALL Y -outcond a@HHMMSS ODAT ADD -jobname counter -memname counter

The resulting Out condition statement:

*CONDITION a101028 0113 ADDED

Today is the 15th of September. The date reference values resolved in this job are written in mmdd date format:

Parent Topic

Prerequisites parameters