If a report of enabled rules with details is required in CA OPS/MVS, how to accomplish this.
Release : 14.0
Component : OPS/MVS
Use LISTINST AOF command in OPS/REXX pgm (trigger from batch if that is what you want to do) to get info about the active rules.
This logic just dumps the complete edq record.
Refer to the Address AOF LISTINST documentation to see the exact details of the edq record (rulename,type of rule, firecount, etc).
address AOF "LISTINST" /* List instorage rulesets */
num_rulesets = queued() /* Total number of rulesets.*/
do i = 1 to num_rulesets /* Loop through LISTINST....*/
pull aofoutput /* and collect each ........*/
ruleset.i = WORD(aofoutput,2) /* ruleset name. */
end
do r = 1 to num_rulesets /* Now loop through each... */
clearq=OPSCLEDQ()
address AOF /* obtain ruleset and...... */
"LISTINST "ruleset.r".*" /* extract each rule member */
total_rules = QUEUED() /* returned to the EDQ */
do total_rules pull ruleinfo /* Simply pull the info.. */
say ruleinfo /* and dump it out. */
end
end
When all DISABLED and ENABLED rules are wanted, as viewed via 4.5.1.
And if also requested the DYNAMIC rules too, then it's needed to do the LISTINST *DYNAMIC.* command too
address AOF "LIST" /* List ALL RULES ENB/DIS */
num_rulesets = queued() /* Total number of rulesets.*/
do i = 1 to num_rulesets /* Loop through LISTINST....*/
pull aofoutput /* and collect each ........*/
ruleset.i = WORD(aofoutput,2) /* ruleset name. */
end
do r = 1 to num_rulesets /* Now loop through each... */
clearq=OPSCLEDQ()
address AOF /* obtain ruleset and...... */
"LIST "ruleset.r".*" /* extract each rule member */
total_rules = QUEUED() /* returned to the EDQ */
do total_rules
pull ruleinfo /* Simply pull the info.. */
say ruleinfo /* and dump it out. */
end
end