× 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.



Hi Rob

The technique I've used is something IBM has a KB on - here're the basics.

Use SNDPGMMSG before the process whose messages you want to monitor. There's a KEYVAR parameter there - it'll put the message key in that variable.

Store that value - it's actually a 4-byte binary - in a variable.

Maybe DLTMSG using that key variable.

Then when the thing is done, do another SNDPGMMSG and save its message key in another variable., then delete that message.

Now the idea is to step back through the message keys from the 2nd to the 1st - some may not still be there, as the system cleans up some things, so there's a message to monitor for.

You can use %bin on the keyvar and decrement it by 1 until you hit the starting value.

I'm not where I can get KB stuff from IBM right now - someone else may have the link to the article - it's all pretty easy to do.

HTH
Vern

On 9/17/2014 1:47 PM, rob@xxxxxxxxx wrote:
I am running the CHGATR command on a directory. The escape message being
thrown is
CPFB414 - Attributes changed for 0 objects. 1 objects not changed.
I have to look at the previous message to determine if the error was
because the directory did not exist, or, I did not have authority to it.

How do I do this programmatically?
PGM
DCL &KEYVAR *CHAR 4
DCL &MSGID *CHAR 7
chgatr '/barneyphil' atr(*alwsav) value(*no)
MONMSG CPFB414 EXEC(DO) /* Object not changed */
/* Figure out why the object was not changed. Might not exist, or you
may +
not have authorization to it. +
Retrieve detailed message indicating why the object was not changed.
*/
RCVMSG PGMQ(*SAME (*)) MSGTYPE(*EXCP) MSGKEY(*NONE) +
WAIT(0) MSGID(&MSGID) KEYVAR(&KEYVAR)
DMPCLPGM /* &MSGID=CPFB414, &KEYVAR=X'40404040' */
EndDo
END:
ENDPGM


Rob Berendt


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.