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



ProgA and ProgB I wrote and ProgB does return if successful to ProgA.
ProgC and ProgD are verdor programs I trying to avoid changing.
ProgC does return to ProgB indicating an error occurred but not details.
The details are sent as a message from ProgD.

When I debug ProgA I can see the error in the joblog but I am having trouble
accessing it.

Thanks,

Rob

On Tue, Apr 20, 2010 at 1:12 PM, hilda1985 <hilda1985@xxxxxx> wrote:

I am not sure I have gotten your idea...
You can have a parm in your pgm B,C,D named return code. After that you
can get the return code in pgm A, mapping this with the massage file as
your design or message array in your pgm A.</:includetail>

------------------ Original ------------------
From: "Robert Rogerson"<rogersonra@xxxxxxxxx>;
Date: Tue, Apr 20, 2010 10:57 PM
To: "RPG programming on the IBM i / System i"<RPG400-L@xxxxxxxxxxxx>;

Subject: Problem receiving a message using qmhrcvpm


I'm having trouble receiving a message which I can see in the job log.
Here
is the scenario...

ProgA calls ProgB
ProgB calls ProgC
An error occurs in ProgC
ProgC calls ProgD to send the message
ProgD sends the message (SNDPGMMSG MSGID(WDC0145) MSGF(TFMMSG) MSGDTA(' ')
TOPGMQ(*SAME
('WIM331')) KEYVAR(&W@MSGNO)
ProgD ends
ProgC ends
ProgB ends returning an error
If an error occurred
// Receive program message
QMHRCVPM( msgBack
: %Size(msgBack)
: 'RCVM0100'
: '*'
: 0
: '*PRV'
: Pm_MKey
: 0
: '*SAME'
: Qusec )

I want to receive the message issued by ProgD (this may be different errors
depending on the error generated in ProgC) so I may display it in ProgA to
give a better indication of what error occurred.
One condition I should add is that ProgC and ProgD are vendor supplied
programs I am trying to avoid changing.

Can anyone shed some light on what I am doing wrong?

Thanks,

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

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



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.