Previous Topic: AOF RETURN StatementNext Topic: )PROC Section—Valid Return Statement Values


)INIT Section—Enable a Rule

The RETURN statement in the )INIT section of an AOF rule allows or disallows the enabling of a rule. Creating logic to prevent a rule from being enabled may be necessary in an environment in which you have multiple CA OPS/MVS images sharing rule sets, and you only want particular rules to be enabled on certain systems.

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

)INIT
/* This rule should only be active on SYSA. Use the OPSINFO  */  
/* built-in function to get the SMFID of this system to see  */  
/* if the rules should be enabled or not.If this is not SYSA */  
/* then use the AOF RETURN statement with a value of REJECT  */  
/* to cause the rule to not be ENABLEd.                      */
if OPSINFO('SMFID') <> 'SYSA' then
  return 'REJECT'

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

ACCEPT

(Default) Allows the rule to be enabled.

REJECT

Prevents the rule from being enabled.

If you do not specify a return value in the initialization section of the rule, the default return value is ACCEPT.

If a runtime error occurs in the INIT section, the return value is REJECT and the rule is not enabled.