There can be one or more clauses within a FETCH statement. Each clause has the
following format:
n
:
expression
;
where n is the identification number of a clause within a FETCH statement and
expression is an expression specifying the value to assign the pseudo-variable $Fn.
Pseudo-variables are the output from a clause of a FETCH statement. This
expression can make reference to any pseudo-variable defined by the adapter,
which could have been created from the SELECT statement or from a previous
clause within the FETCH statement for the class.
An example of a FETCH statement is the following:
FETCH
1:SUBSTR ($V2, 1, 5 );
MAP Statement
The MAP statement of a class definition statement assigns values to the attributes
of the event class instance.
There can be one or more clauses in a MAP statement. Each clause has one of the
following two formats:
attribute_name
=
variable
;
attribute_name
=PRINTF(
format_string
,
var1
,...);
An example of a MAP statement is the following:
MAP
origin=$AGENT-ADDRESS;
msg=PRINTF("Link %s is DOWN",$V3);
The output from a MAP statement is a list of attribute name=value pairs that is
used to generate the outgoing event for the event server.
MAP_DEFAULT Statement
Some attributes, like source and sub_source, could have a constant value for all
the events generated by an adapter type. To not repeat identical clauses for MAP
statements in all class definition statements for an adapter, the CDS file can contain
a MAP_DEFAULT statement. The MAP_DEFAULT statement specifies default
values for the mandatory attribute name=value pairs. The following example
illustrates a MAP_DEFAULT statement:
MAP_DEFAULT
source = SNMP;
sub_source = NET;
# forwarding_agent = $SOURCE_ADDR;
origin = $AGENT_ADDR;
adapter_host = $ADAPTER_HOST;
END
Example
The following example shows a CDS file:
#
# Default attribute values
#
MAP_DEFAULT
Appendix C. Class Definition Statement File Reference
159
Содержание Enterprise Console
Страница 1: ...IBM Tivoli Enterprise Console Adapters Guide V ersion 3 8 GC32 0668 01...
Страница 2: ......
Страница 3: ...IBM Tivoli Enterprise Console Adapters Guide V ersion 3 8 GC32 0668 01...
Страница 8: ...vi IBM Tivoli Enterprise Console Adapters Guide...
Страница 66: ...54 IBM Tivoli Enterprise Console Adapters Guide...
Страница 76: ...64 IBM Tivoli Enterprise Console Adapters Guide...
Страница 90: ...78 IBM Tivoli Enterprise Console Adapters Guide...
Страница 138: ...126 IBM Tivoli Enterprise Console Adapters Guide...
Страница 156: ...144 IBM Tivoli Enterprise Console Adapters Guide...
Страница 176: ...164 IBM Tivoli Enterprise Console Adapters Guide...
Страница 180: ...168 IBM Tivoli Enterprise Console Adapters Guide...
Страница 192: ...180 IBM Tivoli Enterprise Console Adapters Guide...
Страница 193: ......
Страница 194: ...Program Number 5698 TEC Printed in U S A GC32 0668 01...