Guardian Application Conversion Guide

Converting Distributed Systems Management (DSM) Applications
Converting Other Parts of an Application
8–28 096047 Tandem Computers Incorporated
Using EMS Filters
If your DSM application uses filters to select specific event messages, EMS provides
the D-series FILENAMECOMPARE, DECOMPOSE, and DECOMPOSEERROR
functions to use in your filters.
FILENAMECOMPARE compares two variable-length file-name strings. It returns
TRUE if the file names are identical; otherwise, it returns FALSE. In this example,
FILENAMECOMPARE compares the process-descriptor token,
ZEMS-TKN-PROC-DESC, to a specific process-descriptor value:
-- Pass the event if the process descriptor matches.
IF FILENAMECOMPARE (ZEMS^TKN^PROC^DESC, "\west.$yab")
THEN PASS;
DECOMPOSE returns the parts of a 12-word internal-format file name, a file-name
string, or a process handle. DECOMPOSEERROR returns the most recent
DECOMPOSE file-system error if an error occurred, or it returns zero if an error did
not occur. In this example, DECOMPOSE returns the parts of a process descriptor,
and then DECOMPOSEERROR checks for an error:
-- Pass events generated by processes on system \WEST.
IF DECOMPOSE (ZEMS^TKN^PROC^DESC, SYSTEM NAME) = "\WEST"
AND DECOMPOSEERROR = 0 THEN PASS;
-- Pass events generated by the process named $ZA10.
IF DECOMPOSE (ZEMS^TKN^PROC^DESC,
DESTINATION NAME, NAME PART) = "$ZA10"
AND DECOMPOSEERROR = 0 THEN PASS;
For more information about EMS filters, refer to the Event Management Service (EMS)
Manual.