Task Variables

<task declaration>

── TASK ───────────────────────────────────────────────────────────────►
  ┌◄───────────────────────────── , ─────────────────────────────┐
►─┴─<task identifier>─┬────────────────────────────────────────┬─┴─────┤
                      └─ ( ──<task identifier assignment>── ) ─┘

<task identifier assignment>

  ┌◄─────────────── , ──────────────┐
──┴─┬─<task attribute assignment>─┬─┴──────────────────────────────────┤
    └─<file equation>─────────────┘

Explanation

The task declaration declares task variables, which can be associated with particular tasks in a task initiation statement.

If a task initiation statement includes a task variable, then any task attribute assignments or file equations that have been specified for that task variable are applied to the task.

The values assigned to file and task attributes in a task declaration must be constants or constant expressions. Attributes of type name, file name, or title must be assigned constants only.

Any task attribute values or file equations associated with a task variable are not saved across a halt/load. Refer to Job Restart After a Halt/Load for further details.

Task variables can be assigned task attribute values or file equations later in the job by the task assignment statement. Refer to the assignment statement in Statements for a description of the task assignment statement.

The task variable can also be used for inquiries about the values of any task attributes associated with the task, including those task attributes that record task status and task history. This is possible by using various WFL expressions, which are described in Expressions.

WFL provides two predefined task variables. The following task variables can be used to interrogate the values of attributes in the job:

  • MYSELF

  • MYJOB

Refer to Using Task Variables for a discussion of the uses of the task variables, including the MYSELF and MYJOB task variables.