EMS Manual
Compiled Filters
EMS Manual—426909-005
5-15
Constants
Example 1
To use a field reference to exclude all messages except the ones created by the
$ZVPT process:
[#DEF fname32^struct STRUCT
BEGIN
CHAR systemname (0:7);
FNAME name;
END;
]
FILTER fld_ref;
BEGIN
-- Refers to field of a SENDERID token
IF ZEMS^TKN^SENDERID.fname32^struct:name = $ZVPT THEN PASS;
END;
As this example shows, to refer to a subcomponent of a structured token, you must
first define the structure in TACL (within brackets, as usual).
The structured ZEMS^TKN^SENDERID token, which is of data type fname32, contains
the name of the process that created the event message as one field.
Example 2
This example compares the value of a subcomponent of an extensible structured token
with the enumerated constant ZEMS^VAL^FORWARD^DIST.
ZEMS^VAL^FORWARD^DIST indicates that the message was generated by a
forwarding distributor.
FILTER events^from^forwarding^dist;
-- Select all event messages that were
-- generated by a forwarding distributor
BEGIN
IF ZSPI^TKN^SSID = SSID (ZEMS^VAL^SSID) AND
ZEMS^MAP^DIST^STATUS.ZEMS^DDL^DIST^STATUS:ZDIST^TYPE
= [ZEMS^VAL^FORWARD^DIST]
THEN PASS;
END;
Constants
The filter language supports the following types of constants: integers, strings, file
names, subsystem IDs, and constant lists.