The WHEN keyword specifies additional conditions that must be true in order for a rule to take effect.
This keyword has the following format:
WHEN(expression)
This option has the following format:
[operand relational_operator operand] [Boolean_operator operand relational_operator operand]
Can be a character string, an environmental variable, or both.
Can be any of the following character strings:
EQ--Equal
NE--Not equal
GT--Greater than
GE--Greater than or equal
LT--Less than
LE--Less than or equal
IN--Contains a character string
NOTIN--Does not contain a character string
Can be one of the following:
You can join logical expressions together using the Boolean operators (AND and OR) and nested parentheses. Unquoted blanks that immediately precede or follow operators are not considered text.
Usage Notes:
WHEN(&WORD3 EQ hello) WHEN(&WORD3 EQ HELLO)
The following example only matches the lowercase word:
WHEN(&WORD3 EQ 'hello')
Example:
The following message indicates that OS39OSTC has terminated abnormally:
IEF4501I OS39OSTC--ABEND=S0C4 U0000 REASON=00000000
The following rule checks the second word and the last two characters of the fifth word in the message before alerting the operator:
MSGID(IEF4501I) WHEN(&WORD2 EQ OS39OSTC AND &WORD5(9:10) NE 22), COLOR(BRIGHT RED), ALARM(19)
The rule determines whether OS39OSTC has terminated if the second word (&WORD2) of the message is OS39OSTC and the last two digits of the fifth word (&WORD5) are not 22. When these conditions exist, the rule alerts the operator to the problem.
|
Copyright © 2012 CA Technologies.
All rights reserved.
|
|