Execute only once for the first message of a multiline message
search cancel

Execute only once for the first message of a multiline message

book

Article ID: 219590

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

I have a message IEF450 which is appearing on the syslog on multiple lines  but I don't want the action to be triggered a second time.

0090  IEF450I jobname stepname - ABEND=S806 U0000 REASON=00000004 159          
0090          TIME=hh.mm.ss 

I don't need the time showing on the second line                                                  

Environment

Release : 14.0

Component : OPS/MVS

Resolution

Include this IF statement just after the )PROC statement of your rule:

)PROC                           
IF MSG.MLWTOMIN =1 THEN RETURN  

This will make the rule to ignore the second message.

From documentation:
"MSG.MLWTOMIN
When the message is a minor line of an MLWTO message, the value is 1. When the message is the major line of an MLWTO message, or the only line of a WTO message, the variable 0."

Another solution would be to use the MLWTO keyword what causes the rule to be triggered only when the last line of a multiline message appears. In this case the rule would have to be changed to use the variables with the stem: msg.text.1, msg.text.2, etc

Additional Information

https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/using/using-automated-operations-facility-aof-rules/coding-each-aof-rule-type/message-rules/aof-variables-available-in-msg-rules.html