Each TOKEN command defines one token in a pattern. Although you can define as many pattern tokens
as necessary, you should define only the tokens needed to uniquely
identify the message.
Format
TOKEN [token-type] token-position ["token-text"]
where:
token-type
is one of the following:
KEYWORD
FIXED
MASKED
HOSTID [SP-AMS]
RUNID [CP-AMS]
If you do not specify a token type, AMS assumes a type of FIXED
if no masked characters (see 2.10.1) appear in the token-text. If
masked characters do appear, AMS assumes a type of MASKED.
token-position
is a positive number that identifies the token position in the
message that is matched. Tokens are
numbered from left to right beginning with number 1.
The token position must be a positive number. To refer to a
token from the right end of the matched message (numbering tokens
from right to left), use the CONSTRAINT command (see 2.11) and the
_NEGTOKENn predefined variable. Note that the message parsing is still
done left to right.
All token commands require a token-position to be defined except those whose type is HOSTID or RUNID.
token-text
For KEYWORD and FIXED tokens, token-text must be the exact string to be matched. For MASKED tokens, token-text may contain one or more mask characters.
If you do not specify token-text, the token text is taken from the corresponding token in the MESSAGE
command.
Requirements for Each Token Type
Table 2–1
shows the requirements of each token type.
Table 2. Requirements for Each Token Type
Token Type | Description | Token Text | TokenPosition
|
---|
FIXED | Every character in the pattern token
must match the corresponding character in the message token exactly. | Token text is optional.
If not specified, AMS uses the corresponding token
in the MESSAGE command. If specified,
it must match the corresponding token in the MESSAGE command. | Required |
KEYWORD | Every character in the pattern token
must match the corresponding character in the message token exactly. The keyword token should be the most distinctive fixed token
in a message. AMS allows only one keyword token per pattern. | Token text is optional.
If you do not specify token text, AMS uses the
corresponding token in the MESSAGE command.
If you specify token text, it must match the corresponding
token in the MESSAGE command . | Required |
MASKED | Masked tokens contain variable characters
(described later). | Token text is optional.
If you do not specify token text, AMS uses the
corresponding token in the MESSAGE command.
If you specify token text, it must match the corresponding
token in the MESSAGE command . | Required |
HOSTID[SP-AMS] | The host-id token is invisible in system
messages, but can be used to match the name of the sending system. Specify at most one host-id token per pattern. A host-id can contain from 1 to 64 characters,
and the first character must be alphabetic. Use the Operations Sentinel
Console to assign a host-id for each UNIX and MCP system you want
to mange. | Token text is required. SP-AMS compares
it to the name of the host that sent the message.
Masked characters are allowed. Note:
The predefined variable _HOSTID (see Section 3) retains the
case of the host name, so you can use a case-insensitive database
for convenience of pattern matching while still using the actual host
name in its original case when necessary. | Not allowed |
RUNID [CP-AMS]
| A run-id
token is used to match the run-id of the run that sent a console message. Note:
The run-id associated with an Exec message is always blank. | Token text is required.
Masked characters are allowed.
Do not specify a run-id token in a pattern intended
to match Exec messages. | Not allowed |