IBM Enterprise Console Network Router User Manual


 
If the class name equals *DISCARD*, any incoming event matching the SELECT
statement is discarded. Note that an event is also discarded if it does not match
any class definition statement. However, if a particular type of incoming event
must always be discarded (for example, routine events that are of no importance to
administrators), it is more efficient to define a *DISCARD* class definition
statement and locate it at the beginning of the CDS file, rather than let the adapter
evaluate all class definition statements and finally discard the event.
SELECT Statement
There is one SELECT statement for each class definition statement. SELECT
statements have the following general format, where n is the identification number
of a clause within a SELECT statement:
SELECT
n: ATTR(a_op, a_op_value),
KEY(k_op, k_op_value),
VALUE(v_op, v_op_value);
The ATTR part is mandatory and specifies a condition on the attribute name. The
KEY and VALUE parts are optional and respectively specify a condition on the
attribute key and attribute value. a_op, k_op, and v_op are available operators to
express conditions over the attribute name, key, or value (=, !=, <, <=, >, >=,
PREFIX, SUFFIX, CONTAINS). a_op_value, k_op_value, and v_op_value specify the
comparison value.
In order for a SELECT statement to be evaluated successfully, the following
conditions must be met as follows:
v The incoming event must contain an attribute whose name matches the ATTR
part. If the match is not unique (that is, several attributes can match the ATTR
part), only the first match is used. It is the key and value of this attribute that is
referred to in the rest of the statement. For example:
ATTR(=,"ifDescr")
means that the incoming event must contain an attribute named ifDescr.
v If a KEY part is present, the key of the attribute selected during the previous
step must match the condition expressed by the KEY() expression. For example:
KEY(!=,1)
means that attribute ifDescr must have a key with a value other than 1.
Note: AS/400 adapters do not support KEY parts in CDS files.
v If a VALUE part is present, the value of the attribute must match the condition
expressed by the VALUE expression. For example:
VALUE(PREFIX,"Serial")
means that the value of attribute ifDescr must begin with Serial (for example,
Serial1).
Using the previous examples, the complete clause of the SELECT statement reads
as follows:
SELECT
1: ATTR(=,"ifDescr"), KEY(!=,1),
VALUE(PREFIX,"Serial");
Appendix C. Class Definition Statement File Reference 157