Is a combination of OPSTHRSH functions possible?
search cancel

Is a combination of OPSTHRSH functions possible?

book

Article ID: 131098

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction



Reacting to an event no more then 1 time per minute, and no more then 10 times per day, does not result in the expected outcome when using 2 OPSTHRSH functions for this:
*-* 27:if opsthrsh('E',60)>1 |,
>L> E
>L> 60
>F> 1
>L> 1
>O> 0
*-* 28:opsthrsh('E',86400)>10 then return
>L> E
>L> 86400
>F> 2
>L> 10
>O> 0
>O> 0
Expecting the second OPATHRSH function would also return 1 , as it is the first time this rule fired.
Is it not possible to combine 2 OPSTHRSH functions like this?

Environment

Release:
Component: OPSMVS

Resolution

Using the same event is the problem, it causes each OPSTHRSH to increment the event.
So for the first one, (first match for rule) it is set to 1, then the second one increments it to 2.
Use another flavor for OPSTHRSH with the 'E' type.
Say if
  OPSTHRSH('C',86400,'ABCDEF') |, OPSTHRSH('E',60)
then there will be two counts kept, one for the EVENT and one for the CRITERION the 'A' can only be used once since there is only one counter for it.
With 'C' you can have multiples as long as the criterion differs.
So 'A' and 'E' together would give a more straightforward approach. It may be very slightly more efficient than C..