Since we have a rule for $HASP395 and other for $HASP3* the two will be processed on every $HASP395 event, the rule order it will from more specific to the least one.
Would it be possible to write some code so the rule for $HASP395 prevents the $HASP3* from running?
OPS/MVS
The solution is to insert code in the generic rule to bypass message ids that have their specific rules.
For example:
)MSG $HASP3*
)PROC
if msg.id = '$HASP395' then return
/* rest of the $HASP3* rule code */
Another approach can be using the event variable MSG.USER. A value can be set in the less generic rule so that the generic rule can inspect the variable to make decisions.
For example:
)MSG $HASP395
)PROC
msg.user = 'NOAUTO'
/* rest of the $HASP395 rule code */
The generic rule would test the value of this variable:
)MSG $HASP3*
)PROC
if msg.user = 'NOAUTO' then return
/* rest of the $HASP3* rule code */