Use the TYPE command to specify
The message type: OTHER, READ-AND-REPLY, CONTINUOUS DISPLAY
The sender type: NON-PRIVILEGED, PRIVILEGED-EXEC, ANY-SENDER
A test pattern
A pattern of variable length
Format
TYPE [message-type] [sender-type] [TEST] [VARIABLE-LENGTH]
where:
message-type
is one of the following:
OTHER for read-alert, read-only, and AMS internal messages. OTHER is the default message-type for all types of databases, and the only valid message-type for patterns in an SP-AMS database.
READ-AND-REPLY for read-and-reply messages. [CP-AMS]
CONTINUOUS-DISPLAY for the continuous display sent by the OS 2200 Exec. [CP-AMS]
sender-type
is one of the following:
PRIVILEGED-EXEC for messages sent by either the Exec or a privileged run. [CP-AMS]
NON-PRIVILEGED for messages sent by a nonprivileged run. [CP-AMS]
ANY-SENDER for messages you do not care who sent or do not know who sent. ANY-SENDER matches all sender types.
For purposes of pattern matching, CP-AMS considers Exec and privileged messages to be equivalent. The default sender-type is PRIVILEGED-EXEC for READ-AND-REPLY, OTHER, and CONTINUOUS-DISPLAY type messages in CP‑AMS databases. The default and only valid sender-type is ANY-SENDER for all messages in SP-AMS databases.
TEST
Specify TEST if you want the pattern to be tested rather than executed. Generally, if TEST is specified, AMS does not perform the actions specified for the pattern when the pattern is matched. For SP-AMS, it sends diagnostic information to the Operations Sentinel host log and SP-AMS log. For CP-AMS, it sends the information to the OS 2200 host log using an LG console keyin.
With TEST specified, AMS executes conditional logic actions whose expressions evaluate to true and executes actions on variables. In addition, their diagnostic information appears in the host log and SP-AMS log (SP-AMS) or on the host console log (CP‑AMS).
If you are updating a pattern or inserting a new pattern into an existing autoaction database, you may first want to specify the pattern as a test pattern. This is a good way to ensure that the pattern and actions are correct before including them in the production system.
VARIABLE-LENGTH
As a default, AMS uses the total number of tokens in the message text as a match criterion for all standard patterns. A match occurs only if the number of tokens in the message matches the number of tokens as specified in the MESSAGE command in the pattern.
Specify VARIABLE-LENGTH if you want to override the automatic check for total token count in a message. You can specify VARIABLE-LENGTH for standard patterns with keywords or for standard patterns without keywords. VARIABLE-LENGTH has no effect on nonstandard patterns.
Example
This example defines a test pattern:
DEFINE "group2" MESSAGE "THIS IS A USER MESSAGE" TYPE ANY-SENDER TEST