IBM Enterprise Console manual MAP Statement Example, Class Definition Statement File, Keywords

Models: Enterprise Console

1 194
Download 194 pages 8.78 Kb
Page 53
Image 53

PollInterval Specifies the amount of time in seconds to return to a suspended state between checking for new events that have been placed on the message queue. The default is 20. The following example shows the format:

PollInterval=60

ProcessExistingMsgs

Specifies whether the AS/400 messages adapter resets back to the first message on the message queue when starting. NO sends any new messages to the message queue. YES sends the first message on the message queue. This could cause the adapter to resend previously sent messages and create duplicate events sent to the event server. The default is NO.

ServerCCSID Specifies the coded character set identifier (CCSID) of the event server. This is in case the event server has a special code page or graphic character set that needs to be supported. The default is 0819.

Class Definition Statement File

The file /QSYS.LIB/QUSRSYS.LIB/CFG_MSG.FILE/ MSGCDS.MBR defines how events are constructed from information sent by the AS/400 message adapter. It is described in detail in “Class Definition Statement File” on page 18.

SELECT Statement Example

SELECT

1:ATTR(=,$MSG_ID), VALUE(=,CPI5933);

Here, $MSG_ID is a custom keyword set by the adapter. These keywords can be used to write shorthand notation for SELECT statements. The following is equivalent to the previous example:

SELECT 1:$MSG_ID=CPI5933;

For the $MSG_ID keyword, multiple low:high pairs can be specified with spaces as separators. An example is as follows:

SELECT

1:$MSG_ID=CPF 0100:02FF 1000:1FFF 5600:56FF;

FETCH Statement Example

FETCH

1:SUBSTR(value, start, length);

MAP Statement Example

CLASS PerformanceInvestigator

SELECT 1:$MSG_ID=PNV *:*;

FETCH 1:SUBSTR($V1, 0, 3); 2:SUBSTR($V1, 3, 4);

MAP

my_field=PRINTF("attribute=%s has prefix=%s and id=%s", $V1, $F1, $F2);

status=OPEN

END

Keywords

To customize events, the AS/400 message adapter supports the following keywords in class definition statements. Evaluation of these keywords is faster

Chapter 3. AS/400 Message Adapter 41

Page 53
Image 53
IBM Enterprise Console manual MAP Statement Example, Class Definition Statement File, SELECT Statement Example, Keywords