How to suppress MLWTO message when the data tested is at the second line?


Article ID: 206834


Updated On:


CA OPS/MVS Event Management & Automation


We have a message rule that we don't want the message to be on the console because it's generating tons of messages.  The message is on 3 lines and the element to check is on the second line.  After we do the tests, we want to suppress the message from the console and keep it on the syslog.

According to the documentation, the RETURN  SUPRESS only works on the first line: 
If you are attempting to modify the route or descriptor codes of a multiline message, then this logic cannot be accomplished when specifying the MLWTO optional keyword. This is because the MLWTO keyword causes the rule to process after the end-line has been issued, and disposition alteration logic (change route or desc codes) must be performed at the time the primary line of the multiline message is issued.
So, how should we proceed in order to not send those messages to the console?  Do we need to hardcode the SUPPRESS on the )MSG xxxxxxxx MLWTO line?  Will that suppress all messages from the console without testing it in the code after?


Release : 14.0

Component : OPS/MVS


The "SUPPRESS" keyword using in conjunction with the "MLWTO" keyword will suppress the message unconditionally. I suggest that you include code in your rule to re-issue the message if the conditions you are looking for don't match.
You have to use a different message id to avoid a loop but you can use some code like the sample below:

do i = 1 to msg.text.0
newtext.i = msg.text.i

So, if the logic of your rule doesn't go to any of the "return"s you have in the code eventually you should just reissue the message.

Complete sample rule:

)MSG XXXXXXX MLWTO SUPPRESS       <- Suppress all messages                   
if pos('XXXX',msg.text.2) > 0 then return <- if text is found then just suppress
/* otherwise, re-issue the message with a different message id */       
do i = 1 to msg.text.0                               
   newtext.i = msg.text.i