NET/MASTER RMS Management and Operations Guide

Using Automatic Retry for Rule Action NCL Procedures
Creating and Developing Rulesets and Rules
115415 NonStop NET/MASTER RMS Management and Operations Guide 5–59
Using Automatic Retry
for Rule Action NCL
Procedures
If you instruct RMS to start a rule action NCL procedure when a rule is triggered, your
NCL procedure can set a return code to instruct RMS to retry the rule action. The rule
action NCL procedure can also specify message text to describe the rule action retry,
and provide the value of the delay period before the rule action is retried. This feature
applies only to message action rules and message group rules.
On completion of the rule action NCL procedure, the system variable &SYS.RETCODE
determines the success or failure of the rule action. You must use the EXIT core
statement in your procedure to return a value to RMS. Valid values are as follows:
Return Code Description
0 The rule action was completed successfully. Retry of the rule action will not be
performed.
4 The rule action failed. Retry of the delayed rule action will be performed.
16 The rule action failed. Retry of the rule action will not be performed.
You can set the system variable &SYSMSG for the rule action NCL procedure to
determine the message text to be written to the terminal and the activity log (for return
codes 4 and 16). If this variable is left blank, no message is displayed by RMS.
You can set the variable &$RETRYDELAY for the rule action NCL procedure to
determine the period of delay (in seconds) before retry of the rule action. A value
equal to or greater than 1 determines the length of the delay. A value of 0 indicates no
delay of the retry is required. If the variable is left blank, no retry is performed.
The variable &$RETRY indicates the number of rule action retries attempted,
including the current attempt. The value for the first attempt is 1. This variable is
informational only and must not be modified.
Information about delayed actions are stored on disk in an NCL queue file. See
Section 9, “Controlling Message Handlers and Rules,” for how to use the RMS panel
interface to display and delete delayed actions. See Section 9 and Appendix B, “RMS
Commands,” for information about the RMS DISPLAY DELAYED and RMS DELETE
DELAYED commands, which are used to, respectively, display and delete delayed
actions from an OCS window. See Section 9 and Appendix C, “RMS Procedure Calls,”
for information about the ZRMSAPIN ( DELDELAYED ) and ZRMSAPIN
( GETDELAYED ) procedure calls, which are used to, respectively, delete and retrieve
information about delayed actions from a user NCL procedure.
The following example shows a user NCL procedure that attempts to recover a subject:
recover_snax_lu: procedure
/* Attempt to start subject */
INTCLEAR TYPE=RESP
INTCMD ‘opsys start snax lu’ &ZZZMSUBJECT
INTREAD
/* Get the status of the subject */
INTCLEAR TYPE=RESP