Use of msg.bewto in msg rule capturing $HASP310
search cancel

Use of msg.bewto in msg rule capturing $HASP310

book

Article ID: 250222

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

When a job produces 

$HASP310 jobname TERMINATED AT END OF MEMORY

We have a rule to trap this message and check whether its in the RDF Table and mark it in ERROR

To work out the Job we use

IF msg.bewto = 1 THEN Job = msg.ojobname ELSE Job = msg.jobname

But what we have found the value of variable job is JES2 rather than the jobname that produced this message

Are there limitations in the use of msg.bewto with JES2 messages

 

 

Environment

Release : 13.5 14.0

Component : OPS/MVS

Resolution

A simpler approach would be to parse the $HASP310 message to extract the desired jobname from the second word in the message:

$HASP310 jobname TERMINATED AT END OF MEMORY

This line of code is all that's necessary to extract the jobname from the message:

Job = OPSWORD(msg.text,2) 

Additional Information

OPSWORD function documentation:

OPSWORD Function