EMS Manual
EMS Procedures
EMS Manual—426909-005
15-9
EMSADDSUBJECT and EMSADDSUBJECTMAP
Procedures
is the value of the new subject token. Include this parameter if a value is
associated with the subject token.
subject-length
INT:value
is the length, in bytes, of the subject-value field. This parameter is ignored
unless the subject-token-code is defined as a variable-length token. For
alternative ways to specify the length of a variable-length token, see
Considerations.
ssid
INT .EXT:ref:6
is a subsystem ID that qualifies the token code. If not supplied or equal to zero
(6*[0]), ssid defaults to one of the following:
If the current position is in a list, the subsystem ID of the current list
If the current position is not in a list, the subsystem ID in the event-message
header (ZSPI^TKN^SSID)
Considerations
Every event message has at least one subject, which you specify to the EMSINIT
procedure. Use EMSADDSUBJECT to specify additional subjects.
Choose one of these ways to specify the length, in bytes, if the subject token has a
variable-length value:
Use the subject-length parameter to specify the length.
Place the token length in the two bytes that immediately precede the token
value; make the subject-value parameter point to the extra bytes. (Do not
count the extra bytes as part of the length.) When using this method, omit the
subject-length parameter.
If the length of the value of a variable-length subject token is zero, you cannot just
omit both value and length parameters. Specify the length (zero) explicitly, by using
one of the two ways described earlier.
Each call to EMSADDSUBJECT inserts two tokens into the buffer:
The ZEMS^TKN^SUBJECT^MARK token, which always precedes a subject
The subject token that you specified
If the subsystem that generates the event message needs to include tokens from
another subsystem (often a lower-level subsystem), the call to EMSADDTOKENS
must include the ssid parameter, which specifies the subsystem ID of the other
subsystem. When you specify the ssid parameter, every token placed in the