EMS Manual
Compiled Filters
EMS Manual—426909-005
5-23
Comparisons
Except for expressions governed by a LITERALLY function, string comparisons ignore
character case, which makes these strings equal:
"abc"
"ABC"
"AbC"
For information on making case-sensitive comparisons, see LITERALLY Function on
page 5-41.
Comparing Signed Values
No conversion is necessary in a comparison of a ZSPI^TYP^INT token TKN^I with a
small integer. For example:
IF TKN^I < 3 THEN PASS;
The value 3 and the token both have INT values.
If TKN^J is of type ZSPI^TYP^INT2, this statement requires a data conversion, which
the language makes automatically because the data elements (INT and INT2) are of
different sizes:
IF TKN^I < TKN^J THEN PASS;
If the data-element sizes differ, the filter converts each element to an 8-byte signed
quantity.
You can compare two values that have a different number of elements ne1 and ne2. In
such cases, the filter compares only nemin elements, where nemin is the lesser of
ne1 and ne2. For example, when you compare a subsystem ID to the value returned
by an SSID function, the values consist of six and five unsigned integer words,
respectively, because the SSID function omits the version. The comparison stops after
the comparison of the fifth integer.
Comparing Unsigned Values
The comparison of unsigned values is very similar to that of signed values except there
is no sign extension.
Comparing File Names
These file-name comparisons are defined only for equal (=) or not equal (<>)
comparisons. In other comparisons, file names are treated as string data. Node
numbers get no special treatment.
Nodes (systems) pose a special problem for file-name comparisons. Three nodes,
possibly distinct, are involved:
The node that compiles the filter
The node that generates the event message