Dependency keywords

In this topic you can find the list of dependency keywords.

This topic lists all the keywords that you can use when defining a dependency. You can find the syntax of the scheduling keywords and related examples.

In this topic you can find the following dependency keywords:

follows

Using this keyword, you can specify which tasks and workflows must successfully complete before a task or workflow can start running. You can use the following syntax:

Syntax

Internal dependency on a task

follows jobname

[if <condition> [| <condition>...]]

External dependency on a workflow

follows [workstation#]jobstream

[previous|sameday|relative from [+/-] time to [+/-] time|from time [+/-n day[s]] to time [+/-n day[s]] [if <condition> [| <condition>...]]

External dependency on a task

follows [workstation#]jobstream .jobname

[previous|sameday|relative from [+/-] time to [+/-] time | from time [+/-n day[s]] to time [+/-n day[s]] [if <condition> [| <condition>...]]

Arguments

[folder/]workstation
Using this keyword, you can specify the path of the workstation on which the task or workflow that must complete runs. The default workstation is the same of the dependent task or workflow.
[folder/]jobstream
Using this keyword, you can specify the path of the workflow that must complete.
time
Using this keyword, you can specify a time of the day from 0000 to 2359.
jobname
Using this keyword, you can specify the name of the task that must complete. You can use the at sign (@) to specify that all the tasks in the workflow must successfully complete.
previous|sameday|relative from [+/-] time to [+/-] time | from time [+/-n day[s]] to time [+/-n day[s]]
Using this syntax, you can define how to match a specifc workflow or task in the plan with a workflow or task referenced by an external follows dependency. For more information, see Managing matching criteria.
[if <condition> [| <condition>...]]
Using this keyword, you can define conditional dependencies to make a task or workflow run only after some conditions are satisfied by the predecessors. You can also use conditional dependencies to specify alternative flows in a workflow: the successor task is determined according to the conditions satisfied by the predecessor task or workflow. If an output condition is not satisfied, the tasks in the flow do not run and are put in SUPPR status. The behaviour of regular dependency is different, because tasks are put in HOLD status until the predecessor is in SUCC status.
To define more than one condition, use the following syntax:

[if <condition> [| <condition>...]]

You can express different types of conditions:
  • based on the task start of the predecessor task.
  • based on the workflow or task completion status.
  • based on the output condition of the predecessor task.
The conditions must be of the same type and separated by the vertical bar (|) symbol. For example: IF ABEND | FAIL | SUPPR.

When the predecessor workflow or task satisfies the specified status, the successor task runs. You can specify a single, a combination, or all status. To specify more than one status, use the vertical bar (|) symbol as separator.

if Condition_Name
Using this keyword, you can specify either a status or a name for the condition.
if exec
When the predecessor task starts, the successor task runs.
if fail|abend|succ|suppr
When the predecessor task status satisfies the specified task status, the successor task runs. You can specify a single, a combination or all status. To specify more than one status, use the vertical bar (|) symbol as separator.
if abend|succ|suppr
When the predecessor workflow status satisfies the specified workflow status, the successor task runs. You can specify a single, a combination or all status. To specify more than one status, use the vertical bar (|) symbol as separator.
if Condition_Name
When the predecessor task satisfies the output conditions specified for Condition_Name, the successor task runs. You can specify a single or a combination of condition names. To specify more than one condition name, use the vertical bar (|) symbol as separator. Output conditions are defined in the task definition.

Comments

Matching criteria are resolution rules that identify the predecessor task or workflow when there is one or multiple instances of the same predecessor task or workflow in the plan. The successor runs when the dependency is satisfied by the predecessor task or workflow.

Follows dependencies are classified as internal by the scheduler when they are specified only by their task name within the workflow; if they are specified in the workstation#/folder/jobstreamName.jobName format, such follows dependencies are classified as external.

If the workflow includes a task with a follows dependency that has the same name of the workflow, such dependency is added to the plan as an external follows dependency.

For more information and examples on how external follows dependencies are resolved in the plan refer to Matching criteria.

Example
In the following example, the WORKFLOW_2 workflow contains a task definition named TASKDEF1, which has two dependencies: TASKDEF3 which is defined in the same workflow, and TASKDEF2 which is defined inside WORKFLOW_1.
SCHEDULE WS_AGT_1#WORKFLOW_2 TIMEZONE UTC
SCHEDTIME 0930 
:
WS_AGT_0#TASKDEF1
 SCHEDTIME 2000 MAXDUR 0430 ONMAXDUR CONT MINDUR 0100 ONMINDUR CONT 
 FOLLOWS WS_AGT_1#WORKFLOW_1.TASKDEF2 
 FOLLOWS WS_AGT_1#WORKFLOW_2.TASKDEF3 

END

join

Using the join keyword, you can define a set of join dependencies on a task or workflow. Specify the number of dependencies that must be satisfied to consider the join as fulfilled. Alternatively, you can use the ALL keyword to indicate that all dependencies must be satisfied for the successor task to run.

Syntax

[join join_name [0 | numconditions | ALL] OF

DESCRIPTION "..."]

...

ENDJOIN

Arguments

join_name
You can use this keyword to define a name for the set of join conditions.
0
This value indicates that all dependencies must be fulfilled.
numconditions
You can specify the number of dependencies required to satisfy the join conditions.
ALL
You can use this keyword to define that all the dependencies must be fulfilled to satisfy the join conditions.
DESCRIPTION
Optionally, you can use this keyword to define a description for the set of join conditions.

Comments

You can define internal and external dependencies on a task, both standard and conditional.

You can define only internal dependencies on a workflow, both standard and conditional.

Internetwork dependencies are not supported.

Example
  • In the following example, WORKFLOW_1 can run only after all the dependencies have been satisfied.
    SCHEDULE WS_AGT_1#WORKFLOW_1 TIMEZONE America/New_York
    ON RUNCYCLE RC1 "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
    AT 1000 +1 DAYS
    JOIN DEPLIST ALL OF
      FOLLOWS WS_AGT_1#WORKFLOW_01.TASKDEF_01
      FOLLOWS WS_AGT_1#WORKFLOW_02.TASKDEF_02
      FOLLOWS WS_AGT_1#WORKFLOW_03.TASKDEF_03
    ENDJOIN
    :
      WS_AGT_1#TASKDEF_1
      WS_AGT_1#TASKDEF_2
    END
  • In the following example, WORKFLOW_1 can run only after at least two dependencies have been satisfied.
    SCHEDULE WS_AGT_1#WORKFLOW_1 TIMEZONE America/New_York
    ON RUNCYCLE RC1 "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
    AT 1000 +1 DAYS
    JOIN DEPLIST 2 OF
      FOLLOWS WS_AGT_1#WORKFLOW_01.TASKDEF_01
      FOLLOWS WS_AGT_1#WORKFLOW_02.TASKDEF_02
      FOLLOWS WS_AGT_1#WORKFLOW_03.TASKDEF_03
    ENDJOIN
    :
      WS_AGT_1#TASKDEF_1
      WS_AGT_1#TASKDEF_2
    END
  • In the following example, TASKDEF_2 can run only after all the dependencies have been satisfied.
    SCHEDULE WS_AGT_1#WORKFLOW_1 TIMEZONE America/New_York
    ON RUNCYCLE RC1 "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
    AT 1000 +1 DAYS
    :
      WS_AGT_1#TASKDEF_1
      WS_AGT_1#TASKDEF_2
      JOIN DEPLIST 0 OF
        FOLLOWS WS_AGT_1#WORKFLOW_01.TASKDEF_01
        FOLLOWS WS_AGT_1#WORKFLOW_02.TASKDEF_02
        FOLLOWS WS_AGT_1#WORKFLOW_03.TASKDEF_03
      ENDJOIN
    END

matching

Using this keyword, you can set a default matching criteria to be used in all follows dependencies when a matching criteria has not been specified in the workflow definition or in the tasks contained in the workflow.

Syntax

matching {previous |sameday | relative from [+/-] time to [+/-] time

Arguments

For information about the keyword used with matching see the follows keyword.

Example
The following example shows the definition of workflow SCHED2 that:
  • Contains a task1 that can be run today only if it was run yesterday.
  • Needs the instance of workflow SCHED1 running the same day to complete before running.
SCHEDULE PDIVITA1#SCHED2 
ON RUNCYCLE RULE1 "FREQ=DAILY;"
ON RUNCYCLE CALENDAR2 CAL1
MATCHING PREVIOUS
FOLLOWS PDIVITA1#SCHED1.@ SAMEDAY
FOLLOWS PDIVITA1#SCHED2.TASK1 
:
PDIVITA1#TASK1

PDIVITA1#TASK2
END
In this sample the external follows dependency from PDIVITA1#SCHED2.TASK1 inherits the matching criteria specified in the matching keyword.
Example
In the following example, WORKFLOW_1 runs weekly on Friday and depends on WORKFLOW_135205088 workflow. It is scheduled to run at 10.00 a.m. only if WORKFLOW_135205088 has previously run correctly in the same day between 8:00 and 9:00 a.m.

SCHEDULE WS_AGT_1#WORKFLOW_1 TIMEZONE America/New_York
ON RUNCYCLE RC1 "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
SCHEDTIME 1000 +1 DAYS
MATCHING RELATIVE FROM -0200 TO -0100
FOLLOWS WS_AGT_0#WORKFLOW_135205088.@
:
END