× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



John,





Assuming you want an automated method and to not look in the lob log the
basic process is a follows (assuming the messages are still around).



momnsg msgid(CPF4128') exec(do)

rcvmsg pgmq(*EXT) msgtype(*LAST) rmv(*NO) keyvar(&msgkey) msg(&msg)
+

msgdta(&msgdata) msgdtalen(&lsgdtalen) msgid(&msgid) +

sev(&severity) msgf(&msgfile) msgflib(&msgflib)

Next:



rcvmsg pgmq(*EXT) msgtype(*PRV) rmv(*NO) keyvar(&msgkey) msg(&msg)
+

msgdta(&msgdata) msgdtalen(&lsgdtalen) msgid(&msgid) +

sev(&severity) rtntype(&rtntype) msgf(&msgfile)
msgflib(&msgflib)



if (&msgid *EQ 'CPF4128') then(do) /* you already processed this
so skip it */

goto next

enddo



if (&sev *GE 20) then(do)

call yourpgm parm(&msgid &msgfile &msgflib &rtntype &msgdtalen +

&msgdta &sev &rtntype &action2tak)

/* perform whatever action you want to perform */

enddo



enddo



In your program I suggest using the Retrieve Message (QMHRTVM) API. I
suggest using format RTVM0300 if you are going to parse the message
data. With this format you can determine where in the data string a
substitution resides, how long it is and its data type.



Hope this helps.



Gary



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rusling, John
Sent: Tuesday, April 26, 2011 1:20 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Trap CPF4128 message via monmsg in a clle pgm,put message into
variable.



Help, it's been too long.



In a CLLE program, I am trying to catch when CPF4128 occurs.

(Not able to allocate objects needed for file &2 in library &3 member or

program device &4.)



This gets bubbled up from 3rd party software and we want to try catch it

as it occurs or very shortly thereafter in an effort to see what is

denying the allocation.



I can use monmsg to do this.



What I'd like to know is how to dump the message into a variable in the

cl program, then possibly pass the msg to an rpg program to parse it out

and try, like run wrkobjlck or something, -or- find some mechanism to

tell me what the conflicting job/pgm is.



Any algorithm or direction or other ideas is appreciated.



Tfah,



John B







IMPORTANT NOTICE: This message is intended only for the addressee and
may contain confidential, privileged information.

If you are not the intended recipient, you may not use, copy or disclose
any information contained in the message.

If you have received this message in error, please notify the sender by
reply e-mail and delete the message.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.