Map Statement; Map_Default Statement; Example - IBM Enterprise Console Manual

Ibm enterprise console adapters guide
Table of Contents

Advertisement

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:

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
An example of a MAP statement is the following:
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:

Example

The following example shows a CDS file:
format_string var1
Appendix C. Class Definition Statement File Reference
159

Advertisement

Table of Contents
loading

Table of Contents