× 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 Alan,

Thank you for jumping in. I downloaded the utility and had a brief look at the source members you mentioned. Did I miss something or does the utility not need (and hence retrieve) the library names of the programs sending and receiving a message?

What I have seen is that you build a linked list of messages. The attributes per entry are:

- Message ID
- Qualified message file name
- Message data length
- Message data
- Pointer to next entry

Next you add messages in procedures " XVERRH_Throw" and " XVERRH_Rethrow ".

But I did not find any instruction that receives a message so I assume that you do not need to receive a message from the job log. At that point I stopped analyzing the utility.

So I am a bit lost, because I do not have an idea how your standard error handler could help me. What I need is the sender and the receiver of an escape message sent anywhere from a test case. Most of the time it is the RPG runtime that sends an escape message but of course also the user could do that for whatever reasons.

At the end of a test suite the result is displayed in a view and optionally the user can load the source code into the LPEX editor. That works fine for failed assertions because in these cases I know everything from the call stack. But in case of a unexpected error, I miss the library names when I receive the escape message with the QMHRCVPM API.

For know I assume that I will use the QGYOLJBL API to retrieve the received message by its message key from the job log again, so that I can get the library names from the return value of the API. The QGYOLJBL API returns the library names whereas the QMHRCVPM does not return them. I do not mind reading the message twice, because that is not part a regular process.

Anyway, thank you for jumping in. Every voice counts.

Have a nice Easter weekend,

Thomas.

-----Ursprüngliche Nachricht-----
Von: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> Im Auftrag von Alan Campin
Gesendet: Samstag, 30. März 2024 03:30
An: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Betreff: Re: How to get the program library name of a program that sent a message

ACHTUNG: Diese E-Mail stammt von einem externen Absender. Klicken Sie nicht auf Links und öffnen Sie keine Anhänge, solange Sie den Absender nicht erkennen und wissen, dass der Inhalt sicher ist.

May I suggest my standard error handler. You can get a copy by going to www.sourceforge.net/projects/iBuild.

The source code you want to download is XVERRH, XVERRH_B, XVERRH_M01, XVERRH_M02, XVERRH_M03 and XVERRH_PR or I would be glad to send it to you.

My standard error handler has functions that throw an error while logging an error in a linked list. You can then catch the error at a higher level and get the message and details.

Anyway a standard way to handle and return data to the caller.

On Fri, Mar 29, 2024 at 10:0 AM Thomas Raddatz <thomas.raddatz@xxxxxx>
wrote:

I already use the QMHRCVPM message to receive a message send by a program.
The sender information of format RCVM0300 contains the program, module
and procedure name as well as the statement number of the program that
sent the message. But it does not contain the program library name.

However the program library name is displayed, e.g. if you do a
DSPJOBLOG, prompt a message with F1 and switch to the message details with F9, e.g.:

From program . . . . . . . . . : RUCALLTST
From library . . . . . . . . : RPGUNITDVP
From module . . . . . . . . : PGMMSG
From procedure . . . . . . . : PGMMSG_sndEscapeMsgAboveCtlBdy
From statement . . . . . . . : 35600

Hence the information must be available somewhere. Hopefully not only
for the operating system.

So does somebody know how to get the above information of a message
send by a program?

Thomas.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.