ViewPoint Manual
Customizing ViewPoint
ViewPoint Manual—426801-001
6-9
The Default Alternate-Events Filter
You can write a custom filter to add IF conditions to select a subset of the available 
event messages.  Example 6-1 shows a filter example that is designed to pass only those 
event messages that originate from three Compaq subsystems: Pathway, SNAX, and 
Expand.
 else
 fail;
 end;
-- events which have not been discarded by above conditions
-- are returned to Viewpoint. Action and critical events
-- are identified by the following conditions:
-- action events are identified by the action^needed token.
if tokenpresent (zems^tkn^action^needed) then pass 1;
-- critical events are identified by the emphasis token.
if zems^tkn^emphasis <> [zspi^val^false] then pass 2;
end; -- zems ssid section.
pass;
end;
Example 6-1. Filter to Pass Selected Event Messages
 -- Load ZSPI and ZEMS definitions
[SINK [#LOAD $system.ZSPIDEF.ZSPITACL]]
[SINK [#LOAD $system.ZSPIDEF.ZEMSTACL]]
 -- Initialize subsystem IDs, if this is not already done
[#DEF zpwy^val^ssid STRUCT
 BEGIN SSID x VALUE TANDEM.[zspi^ssn^zpwy].0; END;]
[#DEF zsx1^val^ssid STRUCT
 BEGIN SSID x VALUE TANDEM.[zspi^ssn^zsx1].0; END;]
[#DEF zexp^val^ssid STRUCT
 BEGIN SSID x VALUE TANDEM.[zspi^ssn^zexp].0; END;]
 -- Pass event messages from Pathway, SNAX, and EXPAND
FILTER select3;
BEGIN
 IF zspi^tkn^ssid = SSID( zpwy^val^ssid )
 OR zspi^tkn^ssid = SSID( zsx1^val^ssid )
 OR zspi^tkn^ssid = SSID( zexp^val^ssid ) THEN
 BEGIN
 IF TOKENPRESENT (SSID(zems^val^ssid,
 zems^tkn^action^needed)) THEN PASS 1;
 IF zems^tkn^emphasis = [zspi^val^true] THEN PASS 2;
 PASS;
 END;
 FAIL;
END;
Figure 6-2. Default Alternate-Events Filter Source Code (page 4 of 4)










