The COSELECT rule is triggered by other Control-O/COSMOS rules to search for Object database rows on which to perform a specified action. The names of a Filter rule and an Action rule are supplied as parameters to the COSELECT rule.
The COSELECT rule performs the following actions:
If the current row is selected by the Filter rule, the specified Action rule is triggered to perform an action on the current row.
Filter rules and Action rules are described later in this chapter.
The DO RULE statement that triggers the COSELECT rule supplies the following parameters:
COSELECT database filter action |
where
Example
Assume that the following statement is used to trigger the COSELECT rule:
DO RULE=COSELECT DATABASE1 FILTER01 ACTION01 |
Rule FILTER01:
IF %%CURRENT NE %%DESIRED
DO SET = %%COS_SELECTED = YES
ENDIF
Rule ACTION01:
DO SHOUT = TO OPER URGENCY R SYSTEM
MESSAGE CONTROL-O/COSMOS - %%CPU/%%OBJECT/%%CURRENT/%%DESIRED/%%MODE/%%TEXT
A Shout message is issued for each row of DATABASE1 in which the CURRENT column and the DESIRED column do not match.
Parent Topic |