Previous Topic

Next Topic

Book Contents

Book Index

COSRUL Rule

As of version 6.1.00, rules are no longer directly executed by DO RULE statements, but instead through the COSRUL rule. For example, the syntax of statements such as

DO RULE=COSELECT ....

has been changed to

DO RULE=COSRUL COSELECT ....

In addition to calling a specified Control-O/COSMOS rule, COSRUL also determines whether to preprocess, postprocess, or override that rule by using one of the following special AutoEdit variables:

where rulename is the name of the relevant Control-O/COSMOS rule.

In this way, you can add additional statements both before and after those provided by BMC and, if necessary, completely override the original rule.

The following statements, which are found in the USRCLEAR rule of the $COSMOSU table, cause the user-defined rules PREMET01, PSTMET03, and OVRMET04 in the $COSMOSU table to preprocess, postprocess, and override the COSMET01, COSMET03, and COSMET04 rules in the $COSMOSO table, respectively:

/*

/* PREMET01 TO EXECUTE BEFORE COSMET01

/*

DO SET=%%PRE_COSMET01=PREMET01

/*

/* PSTMET03 TO EXECUTE AFTER  COSMET03

/*

DO SET=%%POST_COSMET03=PSTMET03

/*

/* OVRMET04 TO OVERRIDE COSMET04

DO SET=%%OVER_COSMET04=OVRMET04

For example, when you execute the command

DO RULE=COSRUL COSMET01

COSRUL uses the information in the first DO SET statement to execute the PREMET01 rule before calling the COSMET01 rule.

Parent Topic

Control-O/COSMOS Rules