The initialization section of a rule specifies the actions the rule takes when an attempt is made to enable it. This section can contain actions of varying complexity. Use the initialization section to do the following:
Note: The execution of the )INIT section of any rule type is an enable rule event. The REXX stem variable, ENA., is reserved for future enable event environment variables. Any use of the ENA. stem in any )INIT section of a rule will result in a REXX improper variable use error and cause the rule to be not enabled.
The initialization section is optional and if included, this section always follows the event definition section.
The initialization section has the following format:
)INIT /* Insert initialization section actions */
Example: )INIT Section
The initialization section in the following example uses the OPS/REXX OPSINFO function to obtain the SMFID of the current system and determines if this rule is about to be enabled on system SYSA. The rule will reject (not allow) enabling for all other systems. This example also initializes a static variable called TABENDS to zero, which is used in the subsequent processing section.
)MSG IEF450I
)INIT
/*This code will fire ONCE when the rule is enabled */
if OPSINFO('SMFID') <> 'SYSA' then
return 'REJECT'
TABENDS = 0
|
Copyright © 2011 CA.
All rights reserved.
|
|