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



Chuck,

*Or if the "passing 'ProgC'" implies the ProgD is logging
the noted SNDPGMMSG as "TOPGMQ(*SAME ('ProgC'))"
*
yes this is the case. In my original post

SNDPGMMSG MSGID(WDC0145) MSGF(TFMMSG) MSGDTA(' ') TOPGMQ(*SAME
('WIM331')) KEYVAR(&W@MSGNO)

WIM331 refers to ProgC. ProgC (WIM331) is passing the program queue name to
ProgD which is then sending the message TOPGMQ(*SAME ('WIM331'))

*then probably the
best fix is to just change ProgD to use "TOPGMQ(*PRV (&PassedPgm))"

*The vendor program WIM331 (ProgC in my scenario) mentioned above may be run
interactively (so the error messages are displayed) or in batch (where the
messages are disregarded).
What I am attempting to do is call the program in batch but use the messages
generated to give a better indication when an error occurs.
So my question is now if I changed ProgD to *"TOPGMQ(*PRV (&PassedPgm))" *as
suggested would the message still be sent to WIM331 if run interactively.
Would it not be sent to the caller of WIM331.

Thanks,

Rob

On Wed, Apr 21, 2010 at 3:04 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:

Since to "change ProgC" means changing the vendor program, which
had been noted as undesirable, so since that is being considered,
then perhaps just change the vendor ProgD to use TOPGMQ(*PRV
(ProgC))? Or if the "passing 'ProgC'" implies the ProgD is logging
the noted SNDPGMMSG as "TOPGMQ(*SAME ('ProgC'))", then probably the
best fix is to just change ProgD to use "TOPGMQ(*PRV (&PassedPgm))"
[i.e. where "*SAME" is changed to "*PRV"] to get the message sent to
the caller of ProgC? In either case, the ProgB would be the target
of the message being sent. I infer that would be the goal; even if
'ProgA' was alluded.?

Regards, Chuck

Robert Rogerson wrote:
<<SNIP>>

What I'm thinking is to write a marker in ProgA before calling
ProgB as Scott suggested.
Change ProgC to pass 'ProgA' to ProgD to write the message.
(Currently it is passing 'ProgC') <<SNI>>

On Tue, Apr 20, 2010 at 2:10 PM, Scott Klement wrote:
<<SNIP>>

On 4/20/2010 9:57 AM, Robert Rogerson wrote:
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?

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