DSM/SCM Event Management Programming Manual

SPI Programming Considerations for DSM/SCM
DSM/SCM Event Management Programming Manual529844-003
3-3
Writing a Filter
Writing a Filter
You can write a filter to select all DSM/SCM event messages or only specific
messages, such as messages for certain activities. You have two options:
Creating and Loading a Standard Filter
To create and load a filter to select specific DSM/SCM event messages:
1. Determine the selection criteria for the events. You can write specifications to filter
DSM/SCM event messages based on any token in the message, including header
tokens.
2. Write the filter source file using the EMF filter language. This file is an edit
(code 101) file you create with a text editor such as TEDIT.
For an example of a DSM/SCM filter source file, see Example 3-1 on page 3-4.
3. Compile the filter source file using the EMS filter compiler. The following statement
invokes the filter compiler to compile the filter source file from Example 3-1. At the
TACL prompt, enter:
10> EMF /IN myfilter, OUT listfile/ filtrobj
where:
myfilter is the filter source file that contains the statements shown in
Example 3-1.
listfile is an optional file for the compiler listing.
filtrobj is the DSM/SCM filter object file (if no errors occurred during
compilation). If you do not specify this file, the compiler stores the
object in FOBJECT in your default volume and subvolume.
4. Load the filter object file to the distributor. The following statement starts a printing
distributor named $DPHI and loads the filter object file from the previous step.
Enter this statement at the TACL prompt.
11> EMSDIST / NAME $DPHI, NOWAIT / COLLECTOR [\system].$0,
[\system].$ZPHI
FILTER filtrobj,
TIME yyyy-mm-dd hh:mm,
TEXTOUT evtsfile,
TYPE printing | P
Option File Type Page
Create and load a filter object file. Type 845 file generated by the filter compiler 3-3
Create and load a filter table. Edit (code 101) file that you create with a text
editor such as TEDIT
3-6