TYPE Command

Use the TYPE command to specify

Format

TYPE  [message-type]  [sender-type]  [TEST]  [VARIABLE-LENGTH]

where:

message-type

is one of the following:

sender-type

is one of the following:

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