EMS Manual

EMS Procedures
EMS Manual426909-005
15-8
Procedure Descriptions
For more information about using SPI in TAL programs, see the SPI Programming
Manual.
Procedure Descriptions
This subsection describes the EMS procedures in alphabetical order.
EMSADDSUBJECT and EMSADDSUBJECTMAP Procedures
The EMSADDSUBJECT and EMSADDSUBJECTMAP procedures let you add a
subject token to the event-message buffer. Either procedure places the token that you
provide—preceded by a subject-mark token—in the buffer.
In TAL programs, use EMSADDSUBJECT when supplying a token code for the
subject-token-id parameter. This eliminates the need to store the token code in a
temporary variable before passing it to EMSADDSUBJECTMAP. You must use
EMSADDSUBJECTMAP when supplying a token map.
Note: These procedures can be called from 32-bit and 64-bit programs.
In COBOL85 programs, use EMSADDSUBJECTMAP through ENTER TAL.
status returned value
INT:value
is zero or an SPI error code. For a full list of SPI error numbers, see EMSGET and
EMSGETTKN Procedures on page 15-12.
buffer
INT .EXT:ref:*
is the event-message buffer, which the caller must have allocated and initialized.
subject-token-id
INT(32):value (EMSADDSUBJECT)
INT .EXT:ref:* (EMSADDSUBJECTMAP)
is the token code or token map of the subject token to be added to the event
message.
subject-value
STRING .EXT:ref:*
{ status := } { EMSADDSUBJECT ( buffer ! i/o
{ CALL } { EMSADDSUBJECTMAP , subject-token-id ! i
, [ subject-value ] ! i
, [ subject-length ]! i
, [ ssid ] ); ! i