Status Monitoring

AMS maintains two predefined variables to keep track of the status of actions at run time: _STATUS and _ERRORS. These variables are set for all actions, including actions on variables and actions executed with conditional logic.

The variable _STATUS contains the status of the last action executed. Therefore, if you want to use the status of a particular action in an action other than the next action, you must save the value of _STATUS in a user-defined variable.

The variable _ERRORS contains the number of action errors encountered while processing actions associated with the matched pattern.

You can use these variables when specifying additional actions based on the success or failure of previous actions.

_STATUS Values

The variable _STATUS can have one of the following values:

Value

Description

0

AMS successfully executed the action with no warnings.

1

AMS executed the action but issued a warning.

-1

AMS encountered an error and did not execute the action.

Successful Action (0)

If AMS can evaluate and execute the action without error or warning, the action is considered successful. The variable _STATUS is set to zero to indicate that the action was executed successfully by AMS.

AMS Warnings (1)

Warnings identify situations you should investigate to determine whether there is a problem in your database, in another Operations Sentinel process, or with a managed host. In these situations AMS cannot execute the action exactly as defined in the database and makes assumptions about which actions are appropriate and executes them. A warning sets the variable _STATUS to 1 but does not increment the variable _ERRORS. Warnings that result from executed actions are logged but do not generate alarms or alerts. SP-AMS logs errors in the SP-AMS log and in the host log. CP‑AMS logs errors in the OS 2200 partition log file.

The warnings both SP-AMS and CP-AMS can issue include:

Warnings [SP-AMS]

The warnings that only SP-AMS can issue include:

Deactivation in progress

A pattern in the autoaction database matches the database deactivation message or the automation termination message at the same time that a database is being deactivated. The ACTIVATE or DEACTIVATE action (see 4.4. and 4.8) specified in the matched pattern is ignored when database deactivation is already in progress.

Warnings [CP-AMS]

The warnings that only CP-AMS can issue include:

Warnings are logged to trace log files and the host system log, using LG keyins, when in DEBUG mode.

Errors (-1)

Errors generate console alarms or alerts that AMS logs. In SP-AMS, errors are logged in the log SP-AMS and in the host log. CP-AMS logs errors to the OS 2200 system log file.

The two types of errors are minor and major. Minor errors affect only the action being executed; major errors affect the database. Most minor errors occur because text substitution has failed or because the action text that was substituted was not valid for the action type. Most major errors are caused by a corrupted database or a software failure.

Minor errors cause AMS to set the predefined variable _STATUS to -1 and to increment the predefined variable _ERRORS. AMS handles the results of minor errors depending on the type of action being executed, as follows:

Major errors cause the processing of the action to be discontinued, and no further processing of actions is performed for the matched pattern. AMS discontinues pattern matching and deactivates the database. In this case, the normal database deactivation message is not processed and the values of all variables are lost.