EMS Manual
Reporting Events
EMS Manual—426909-005
8-14
Example: Writing an EMS Interface Into a Program
! Call WRITEREAD to send event-message buffer to $0--
CALL WRITEREAD ( FILENUM, ! from OPEN
EVENT^BUF, ! event-message buffer
EVENT^SIZE, ! from SSGETTKN above
0 ); ! read count
The read count must be 0 (zero) when sending an event message. WRITEREAD is
used instead of WRITE to indicate to the collector that the buffer is an event message
and not ASCII text.
In COBOL85, use the WRITE verb (not READ WITH PROMPT, as you might expect) to
send the event message to the collector.
Step 4: Close an EMS Collector
To close an EMS collector, use the CLOSE procedure. Pass the CLOSE procedure the
file number returned by the corresponding OPEN call, as this TAL example shows:
! INT FILENUM is assumed from OPEN example above.
CALL CLOSE ( FILENUM );
For more information about procedure calls, see the Guardian Procedure Calls
Reference Manual.