For unattended mode, you can use the TRME option on an OM keyin to abort any nonprivileged run that sends a read-and-reply message that does not match a pattern in the active CP-AMS database. A match to a pattern without any actions is still considered a match.
The TRME option minimizes the possibility of program hangs resulting from unanswered messages when no operator is present.
When CP-AMS aborts a nonprivileged run that sent an unanswered read-and-reply message, it issues
The following LG keyin:
LG*run-id ERROR DUE TO R-AND-R MSG IN UNATTENDED MODE
An E keyin to abort the nonprivileged run
A blank or null response to the outstanding message
When the TRME option is not on, AMS maintains a list of read-and-reply messages that are not processed in case the TRME option is turned on later. To be in this list, the message must be a nonprivileged read-and-reply message that has not yet been answered and that did not match a CP-AMS pattern when it reached the console.
CP-AMS reprocesses these old messages as well as the new incoming messages when the TRME option is turned on. CP-AMS does not make a second attempt to find a match in the CP-AMS database; it only checks to see if it should abort the run.
This has some important implications. If your site currently has nonprivileged runs, and you do not want them aborted in unattended mode, you must take one of the following actions:
Turn off the TRME option.
Change the runs to execute as privileged.
Place matching patterns for the messages in the CP-AMS database.
Remove from the runs the messages that cause the termination.
An application always issues privileged messages if it is started with a user-id that has the COM$PRV privilege. Therefore, if you do not ever want a particular application to abort, make sure the user-id that starts the application has the COM$PRV privilege. You can use Security-Admin client to update the user-id to have this privilege.
It is possible that some nonprivileged runs will not be aborted even though they have an unanswered read-and-reply message (issued by @MSG,W) on the system console. This occurs when a matching pattern is defined in the active database, but a response action is not specified in the pattern. To ensure that the message does not hang the program, define a response action for all modes, or save the RRID of the message in a variable. You can then use an ANSWER action to answer the read-and-reply message when a later message arrives.
You should be aware of the following possible scenarios. They all assume that the message is a nonprivileged read-and-reply message.
Scenario 1
You define a pattern for the message with different actions specified for different modes: Issue an alarm if there is a match in casual mode, or start a cleanup job and abort the run in unattended mode.
While in casual mode the message is sent to the system console. CP-AMS finds a matching pattern in the CP-AMS database and issues the alarm. But no response is given to the message, so it remains unanswered on the system console. Because a match is found, it is not placed in the TRME message list.
The mode changes to unattended with the TRME option ON. CP-AMS does not reprocess the message; it remains unanswered on the system console.
Scenario 2
You define a pattern for the message but define these actions only for unattended mode: Respond to the message and start a follow-up run.
While in casual mode the message is sent to the system console. No action is taken, and the message remains unanswered on the console.
The mode changes to unattended with the TRME option ON. Again, CP-AMS does not reprocess the message; it remains unanswered on the system console. Note that CP-AMS did not take any default actions because there was a matching pattern in the database.
Scenario 3
There are two CP-AMS databases. The first database does not contain a pattern matching the message. The second database contains a pattern matching the message. This pattern includes appropriate actions.
While in casual mode with the first database active, the message is sent to the system console. Because there is no match, CP-AMS takes the default action of issuing an alarm and saving the message in the TRME message list.
The second database is activated. This automatically deactivates the first database.
The mode changes to unattended with the TRME option ON. CP-AMS reprocesses the message and aborts the run. It does not search for a match in the second database.
Scenario 4
You define different actions for different operating modes: For casual mode, respond to the message and start a tape save run; for unattended mode, respond to the message and start a disk save run.
While in casual mode the message is sent to the system console. CP-AMS matches a pattern to the message, sends a response to the message, and starts the tape save run. Because there was a match, the message is not added to the TRME message list.
The mode changes to unattended with the TRME option ON. CP-AMS does not reprocess the message, nor should the message remain unanswered on the system console unless the host fails to acknowledge receipt of the response.