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



You guess correctly. After an extended time with IBM, what you have said is 
what I have found out. I appreciate the input and effort. Thank you.

________________________________

From: rpg400-l-bounces@xxxxxxxxxxxx on behalf of Simon Coulter
Sent: Tue 6/27/2006 5:31 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Adding a parm to a procedure/function




On 27/06/2006, at 11:04 PM, Turnidge, Dave wrote:


I have changed the "PI" PrcCmd to include the second parameter, AND
have
changed the ERRC0100 data structure to have all fields. That is,
instead
of just having BytPro, I have BytPro, BytAvl, MsgId and MsgDta.

Now when I debug my program, the %Error IF statement shows no error,
however ERRC0100 does show that there was an error, and MsgId contains
the message ID that I am looking for.

So, why does the CallP(e) not trigger the %Error any more? And second,
and probably more important, what is the "correct" way to accomplish
what I am trying to do?

Given that you haven't supplied any of the code showing how this used
to be handled and how you now handle it, my GUESS is that Carsten's
code set BytPro to zero thus informing the API that it should send
exceptions which would cause %ERROR to be turned on. Your code PROBABLY
sets BytPro to the length of ERRC0100 thus instructing the API to no
longer send exceptions but to populate the error code structure
instead.

You'll need to check BytAvl > 0 to determine is an error occurred and
process accordingly. %ERROR will never be set unless the API crashes.

You'll also need to determine the number of parameters received
(%PARMS) and only populate the MsgIdRtn field if the number of
parameters is 2 or more.

As for whether you are "on the right track". This is one possible
approach that many would find acceptable.

Regards,
Simon Coulter.
--------------------------------------------------------------------
    FlyByNight Software         AS/400 Technical Specialists

    http://www.flybynight.com.au/
    Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
    Fax:   +61 3 9419 0175                                   \ /
                                                              X
                  ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------


--
This is the RPG programming on the AS400 / iSeries (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 ...


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.