Previous Topic: )PROC Section—Valid Return Statement ValuesNext Topic: Building and Controlling AOF Rules


)TERM Section—Disable a Rule

The RETURN statement in the )TERM section of an AOF rule allows or disallows the disabling of a rule.

The )TERM section of an AOF rule has the following format:

)TERM
/* This rule must never be disabled, unless CA OPS/MVS       */
/* is shutting down. Use the OPSINFO function to see if   */
/* the product is terminating. If it is not, then don't   */
/* allow the rule to be disabled by using the REJECT      */
/* value of the RETURN statement.                         */
if OPSINFO('PRODUCTSTATUS') <> 'TERM' then 
  return 'REJECT'

Valid values for a RETURN statement in the termination section of a rule are:

ACCEPT

(Default) Allows the rule to be disabled.

REJECT

Prevents the rule from being disabled.

If you do not specify a return value, then the default return value is ACCEPT.

If a runtime error occurs, then the return value is ACCEPT (assuming that the error occurs while the termination section is executing).

Note: A return value of REJECT stops the disabling of a single rule only. If you disable a rule set, the enabled rules in the rule set are always disabled regardless of the RETURN values in the individual rules.

More information:

Building and Controlling AOF Rules