DSM/SCM Event Management Programming Manual

DSM/SCM Event Management Programming Manual529844-003
3-1
3
SPI Programming Considerations for
DSM/SCM
This section describes programming considerations for Distributed Systems
Management/Software Configuration Manager (DSM/SCM) event messages.
For more information on event management and the Event Management Service
(EMS) filter language (EMF), see the EMS Manual.
Retrieving and Decoding Event Messages
With the programmatic interface to EMS, a management application can receive
DSM/SCM event messages and execute appropriate actions if necessary. The
application opens an EMS distributor process and requests the DSM/SCM event
messages, which are stored in a disk log file. Event message selection is based on a
DSM/SCM filter, which you write and load to the distributor.
To retrieve and decode event messages:
1. Declare a buffer of appropriate size for the EMS GETEVENT command and its
response. (The maximum buffer size needed for any DSM/SCM event is 4000
bytes.)
2. Start an EMS consumer distributor and open it using the #ZSPI qualifier in the
process name.
3. Format an EMS distributor CONTROL programmatic command to load a filter you
have written and to specify the source and destination of the event messages if
you want. (The filter selects which events your application will process. For more
information on filters, see Writing a Filter on page 3-3.) Send the CONTROL
command to the consumer distributor.
4. Read the response from the distributor using the mechanism appropriate to your
programming language (for example, a WRITEREAD call in TAL).
5. For each event message:
a. Format and send a GETEVENT command to the consumer distributor to get
the next event message.
b. Read the response from the distributor using the mechanism appropriate to
your programming language (for example, a WRITEREAD call in TAL).
Topic Page
Retrieving and Decoding Event Messages
3-1
Considerations for DSM/SCM Event Management 3-2
Writing a Filter 3-3