Expand Management Programming Manual
 EVENT MANAGEMENT
 Filter Source File
 Filter Source File
 The filter for this example is as follows:
 == File MYAPFS
 [#SET zexp^val^ssid
 [zspi^val^tandem].[zspi^ssn^zexp].[zexp^val^version]]
 [#SET myap^val^ssid
 [myap^val^owner].[myap^ssn^myap].[myap^val^version]]
 -- Return EXPAND events of low line quality.
 FILTER low^line^quality ( SSID(myap^val^ssid
 , myap^tkn^quality^threshold) );
 BEGIN
 IF zems^tkn^eventnumber = [zexp^evt^net^line^qual]
 AND zspi^tkn^ssid = [zexp^val^ssid] THEN
 BEGIN
 IF zexp^tkn^line^qual
 < myap^tkn^quality^threshold THEN PASS;
 END;
 END;
 Additional TAL Source Modules
 This example requires the two additional TAL procedures given
 below: get^threshold (to replace get^cpu^num in the EMS manual
 example) and abort^low^qual^line (to replace displ^event in the
 EMS manual example). The abort^low^qual^line procedure, in
 turn, calls upon the following procedures from the example in
 Section 7, and therefore must be preceded by them: open^scp,
 handle^spi^error, call^scp, build^cmd, and abort^line.
 PROC get^threshold;
 BEGIN
 INT got^it;
 ! This procedure prompts the operator for a line quality
 ! threshold, to be passed as a parameter to the filter
 got^it := false;
 WHILE ( NOT got^it ) DO
 BEGIN
 s^term^buf ':=' ["Bad Line Quality?: "]
 -> @end^of^text;
 text^len := @end^of^text '-' @s^term^buf;
 8-95










