EMS Manual

Generating Standard Events
EMS Manual426909-005
10-28
Task 10.2: Build Your Event Message Buffer
Use the FILE_OPEN_ procedure to open the primary or alternate collector process.
Task 10.2: Build Your Event Message Buffer
1. If you are generating a usage threshold event:
a. For each resource whose usage is to be reported, allocate a control block
dedicated for that resource. Initialize the control block (only once) using the
EMS_UTCB_INIT_ procedure.
b. Call EMS_USAGE_THRESHOLD_CHK_ every time the usage level of a
resource changes. This returns a flag signifying whether to generate the usage
threshold event. For more information, see Standard Usage Threshold Event
on page 11-31.
2. Call the EMS_COMMON_TOKENS_EVT_BLD_ procedure (only once per event
message) to initialize your event message buffer with all the required common-
standard tokens and specify your first event subject.
This automatically provides all common-standard tokens provided by EMS. For
more information, see EMS_COMMON_TOKENS_EVT_BLD_ Procedure on
page 11-44.
3. If your event has multiple subjects, call the EMSADDSUBJECT or
EMSADDSUBJECTMAP procedure one or more times to add the additional
subjects to your event message buffer. For more information, see
EMSADDSUBJECT and EMSADDSUBJECTMAP Procedures on page 15-8.
4. If your event has private tokens, call EMSADDTOKENS or EMSADDTOKENMAPS
one or more times to add your private tokens to your event message buffer. For
more information, see EMSADDTOKENS and EMSADDTOKENMAPS Procedures
on page 15-10. You can also call these procedures to override the default value for
these header tokens:
Required Common Token Default Value (page1of2)
ZEMS-TKN-NAME-
MANAGER (change for
private buffers only)
Not present unless specified by the corresponding optional
parameter in the EMS_COMMON_TOKENS_EVT_BLD_
procedure.
ZEMS-TKN-NAME-MANAGER can only be added by
EMSADDTOKENS; it cannot be changed by this procedure
ZEMS-TKN-CONTENT-
STANDARD (change for
private buffers only)
ZEMS-VAL-NULL