EMS Manual

Compiled Filters
EMS Manual426909-005
5-36
Statements
IF fflag THEN FAIL;
IF qflag THEN PASS;
-- If control reaches this point, an implicit FAIL
-- statement is executed.
END -- End of filter specification
IF Statement
The IF statement provides for conditional execution of a statement that follows THEN
and a statement that follows ELSE.
expression
is any Boolean expression.
statement-1
is any statement. statement-1 is executed only if expression is TRUE.
statement-2
is any statement, simple or compound. If present, statement-2 is executed only
if expression is FALSE.
Example
This filter fragment shows IF statements with and without ELSE clauses:
.
.
.
IF flag1 THEN PASS 1;
IF flag2 THEN PASS 2 ELSE PASS 3;
END; -- End of filter specification
PASS Statement
In a compiled filter loaded into a collector, the PASS statement directs the collector to
log the current event message. (The pass value is ignored.) In a compiled filter loaded
into a distributor, the PASS statement directs the distributor to print, forward, or return
the current event message (and pass value, if any), depending on whether the
distributor is a printing, forwarding, or consumer distributor, respectively. The current
execution of the filter then terminates.
IF expression THEN statement-1 [ ELSE statement-2 ]