Previous Topic

Next Topic

Book Contents

Book Index

Using the DO SET Statement

The DO SET statement is used to set values to user-defined variables, or to specify AutoEdit control statements. The format of the DO SET statement is

DO SET=%%var = value

or

DO SET=%%var = valid_expression

or

DO SET=AutoEdit Control-statements

%%var must be a valid user-defined AutoEdit variable.

Control-O attempts to resolve the variable to a single value by processing it from right to left. For example

DO SET=%%BACKUP_UNIT_%%$WDAY = EE%%$MONTH.%%$DAY

On Sunday the 24th of September, the user-defined symbol %%BACKUP_UNIT_1 is assigned the value EE0924.

If the symbol assigned in the DO SET statement is not completely resolved, the default action is to cancel the DO SET action and the subsequent DO actions of the current rule activation. This default can be overridden by using the %%$RESOLVE NO control statement in a previous DO SET statement, in which case the symbol is resolved as far as possible before performing the DO statement in which it is found. For more information, see %%$RESOLVE.

When rule (DO parameter) activation is canceled, a message is sent to the IOA Log.

All variable assignments remain valid during the activation of that specific rule and will not affect other rules unless you set GLOBAL to Y.

When Control-O tries to resolve a symbol, it searches for the value according to the following order:

  1. AutoEdit System variables
  2. AutoEdit reserved words (control statements)
  3. user-defined variables (Local)
  4. user-defined variables (Global)

A Global AutoEdit variable that is referred to as %%variable resides in the default global member (usually $GLOBAL).

A Global AutoEdit variable can be assigned to a specific global member by referring to it as follows:

%%member\variable

For an explanation of Global assignments, see DO SET: Automated Console Action Parameter.

The maximum number that can be handled by mathematical AutoEdit operations is 231 - 1, (that is, 2147483647).

Parent Topic

Assigning AutoEdit Variables