EMS Manual

Compiled Filters
EMS Manual426909-005
5-13
Tokens
index
is an integer that specifies an occurrence of the token in the event message.
index must have a value between 1 and 1023, inclusive. By omitting index, you
select the first occurrence of the token.
If you specify a value for index that is less than 1 or greater than 1023, the filter
compiler issues this error message:
*** Error ***
This number must be between 1 and 1023, inclusive.
You must qualify the name of a token with the name of the subsystem ID if the EMF
default subsystem ID at the place of reference does not match the subsystem ID of the
token in the event message.
Considerations
Use qualified token names to override the EMF default subsystem ID.
Do not use this syntax to refer to parameter tokens.
For information on how to specify a token when qualification is unnecessary, see
Tokens (Unqualified) on page 5-11.
Remember to qualify EMS tokens that are not header tokens by ZEMS^VAL^SSID.
Or you can qualify all EMS tokens and ignore the distinction between header and
data-portion tokens.
You might ask whether the subsystem ID of a token can be derived from the token
name to avoid the need for name qualification. The answer is that some
subsystems use different naming conventions, so the compiler must use the token
name only to determine the token code.
If you specify a value for index that is less than 1 or greater than 1023, the filter
compiler issues this error message:
*** Error ***
This number must be between 1 and 1023, inclusive.
Example
To qualify the EMS token in this statement (which is incorrect in most contexts):
IF ZEMS^TKN^ACTION^NEEDED = [ZSPI^VAL^TRUE] THEN PASS;
Write this statement which is always correct:
IF SSID ( ZEMS^VAL^SSID, ZEMS^TKN^ACTION^NEEDED ) =
[ZSPI^VAL^TRUE] THEN PASS;