NET/MASTER RMS Management and Operations Guide

Creating a Ruleset
Creating and Developing Rulesets and Rules
115415 NonStop NET/MASTER RMS Management and Operations Guide 5–7
Implementing User-Defined Preprocessing
You can use your own exit NCL procedure to process messages before RMS rule
processing is performed. You must use the EXIT core statement in your procedure to
return a value to RMS. If the return code is zero, RMS continues to deliver or suppress
the message according to the specified delivery philosophy. If the return code is non-
zero, RMS terminates the processing of the message and continues to process the next
message.
Note If the preprocessing exit NCL procedure returns a nonzero return code to an EMSPROC, LOGPROC,
or MSGPROC message handler, and the exit NCL procedure does not explicitly (1) use the appropriate
NCL verb xxxCONT to return the message to NonStop NET/MASTER MS or (2) use the appropriate NCL
verb xxxDEL to delete the message, the handler returns the message to NonStop NET/MASTER MS for
normal delivery.
If the preprocessing exit NCL procedure returns a nonzero return code to an INT-type message handler,
and the exit NCL procedure does not explicitly use the NCL verb INTCONT to pass the message to the
next highest processing environment, the handler deletes the message.
Note The preprocessing exit NCL procedure executes in conjunction with the message handler. When the
procedure starts executing, all processing within the handler stops until the procedure returns control to
the handler. If the message arrival rate is high, you should avoid introducing operations that may cause
lengthy delays in the procedure (for example, file input-output operations). If the procedure aborts, the
handler also aborts.
Your preprocessing exit NCL procedure has access to the following RMS variables:
The rule contents variable, &$RMSMHTYPE (read only).
User variables, which begin with &$UV (read and write).
Message MDO variables &$xxx, where xxx is either the message handler type
EMS, MSG, LOG, or INT. Each message MDO variable is read and write.
Changes to the &$RMSMHTYPE variable are not retained when the procedure
terminates. Changes to the &$UV-prefixed variables and the MDO variables,
however, are retained when the procedure terminates.
If the preprocessing exit NCL procedure is used in an EMSPROC message handler,
some messages may be suppressed by a filter table and, therefore, are not processed by
the preprocessing exit NCL procedure.
Place the preprocessing exit NCL procedure in the NonStop NET/MASTER
customized procedure library. The name of the library is in the NonStop
NET/MASTER MS startup parameter NCLCUSTSRC. Use the NonStop
NET/MASTER MS SHOW PARAM command on the OCS command line to display
the value of NCLCUSTSRC.
You may place your preprocessing exit NCL procedure in your NonStop
NET/MASTER user procedure library if you are the only person who will use this