EMS Manual

Generating Standard Events
EMS Manual426909-005
10-30
Task 10.5: Test Your EMS Code
The tokens you defined for your subsystem
Include only the definitions in the programming language of your code. For information
on how to include a definition file in your programming language, see the SPI
Programming Manual. Get all HP provided tokens from the ZSPIDEF subvolume.
Task 10.5: Test Your EMS Code
You must test your EMS code to verify:
An event is generated only under the expected conditions and the event generated
is of the appropriate type.
All required tokens in an event message are present.
All optional tokens in an event message are present only under the appropriate
conditions.
All tokens in an event are correctly encoded.
All event messages are logged to the appropriate collectors.
There are no unexpected or unknown tokens in the event message.
There are several ways to test the content of an event, including:
Send the event to the EMS collector and write an EMS distributor to read the event
from the log for verification.
Use INSPECT to set a breakpoint in your program just before the event is sent to
the collector and display the event buffer using the DISPLAY event-buffer
TYPE EMS command.
The primary collector is available at system generation, so you can immediately log
events to it. Run EMSCINFO to determine the location and name of the current log file.
If you report events to an alternate collector, you need to run EMSACOLL to start up an
alternate collector process. Specify the log file associated with this collector when you
start the program.
You should be able to use the default attributes of the primary and alternate collectors
for testing. If you need to change the defaults, run EMSCCTRL.
For details about EMSCINFO, EMSACOLL, and EMSCCTRL, see Section 13, EMS
Programs.
Programming
Language of
Definition
Standard
SPI Tokens
Standard
EMS Tokens
Standard
COMM SUBSYS Tokens
In TAL ZSPITAL ZEMSTAL ZCOMTAL
In TACL ZSPITACL ZEMSTACL ZCOMTACL
In COBOL85 ZSPICOB ZEMSCOB ZCOMCOB
In C ZSPIC ZEMSC ZCOMC