Previous Topic

Next Topic

Book Contents

Book Index

COSELECT Rule

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:

  1. The COSELECT rule applies the specified Filter rule to each row of the specified Object databases.

    If the current row is selected by the Filter rule, the specified Action rule is triggered to perform an action on the current row.

  2. The COSELECT rule increments the row number (%%$DBROW) and applies the Filter rule to the next row of the Object database.

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

Control-O/COSMOS Object Update Rules