Previous Topic: Dynamic Rules Support for DISABLENext Topic: Dynamic Rules Support for ENABLE


AOF ENABLE—Enable Rules

The ENABLE command makes rules eligible to run, causing the )INIT sections of those rules to execute. This command sets the RC variable to zero. Unless the NOOUTPUT keyword has been specified, the external data queue contains the results of any SAY statements in the )INIT section of the rule. These results appear as OPS1000I messages.

AOF ENABLE has the following format:

ADDRESS AOF "ENABLE keywords"
[ruleset|ruleset.rule|*DYNAMIC.rule[STEM(stemname)]]
[SYSTEM(ALL|EXT|sysnames)]
[SYSWAIT(seconds)]
[OUTPUT|NOOUTPUT]

Note: If you specify *DYNAMIC.rule, you may also specify the STEM(stemname) keyword.

STEM

Specifies the stem name of the variables.

Use STEM when the rules that you want to enable are dynamic rules whose source text is contained in REXX stem variables.

The value of stemname can be up to 84 bytes long and does not need to end with a period. CA OPS/MVS recognizes the end of the source text of the rule when it encounters a null stem variable value or a stem variable that is undefined or uninitialized. A rule that is constructed in stem variables can have a maximum length of 255 characters per stem variable. If you omit the STEM keyword, CA OPS/MVS retrieves the source text of the rule from the external data queue; this is the default. The maximum length of lines in the external data queue is 255.

Note: At the time they are enabled, non-dynamic rules have a one-to-one correspondence with a member in a rule set. Dynamic rules, in contrast, exist only in storage.

More information:

ADDRESS AOF Command Format

ADDRESS AOF Return Codes

AOF ENABLE Sample Coding Statements

The following examples show sample coding statements for AOF ENABLE:

Note: The rule issues a REXX SAY statement to the console every ten times that the rule executes. When the rule is disabled, it issues a REXX SAY statement that indicates the total number of times that the rule executed.