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

I assume you speak German, because your eMail address extender is .de.
If so, you might check the home page of Dieter Bender
(http://www.bender-dv.de/)
Among his freeware he has a tool, to dynamically call procedures.
This tool is based on the APIs QleActBndPgm, QleGetExp.

May be it helps!

Mit freundlichen Grüßen / Best regards

Birgitta

"Shoot for the moon, even if you miss, you'll land among the stars."
(Les Brown)

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces+hauser=sss-software.de@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+hauser=sss-software.de@xxxxxxxxxxxx]Im Auftrag
von Knezevic, Mihael
Gesendet: Dienstag, 1. August 2006 14:30
An: RPG programming on the AS400 / iSeries
Betreff: AW: dynamically calling procedure of bound module


yep. thanx for the answer. you are right. i probably should use procedure
pointers and resolved it with passing an array of proc pointers which will
be filled by the procedure of the other module within the same program.

thanx.

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Simon Coulter
Gesendet: Dienstag, 1. August 2006 14:21
An: RPG programming on the AS400 / iSeries
Betreff: Re: dynamically calling procedure of bound module


On 01/08/2006, at 10:03 PM, Knezevic, Mihael wrote:

i have several modules bound into one program. now i want to to call a
procedure. problem is that the name of the procedure is inside a
variable. how can i now call the procedure where the module is bound
into the same program object?

i fiddled with the api Get Export but i can't get it working. is this
even the right method of doing it?

all articles covering this topic try to call a procedure from a service
program. that is not what i want to do.

I'm not sure I understand exactly what you are trying to do. I can
interpret your statements in two ways:
        1) You want to call a procedure within the current program but you
don't know the name until run-time
        2) You want to call a procedure with a program from another program

GetExport won't work for programs because programs cannot export
procedures.

For 1) you should use procedure pointers rather than the procedure name.

For 2) the system does not directly support calling procedures in a
program object from outside that program object. That's what service
programs are for. I think you can make this work but you'll need to
provide a method of calling the the program to retrieve a procedure
pointer. The invoke the procedure via the pointer.

Hmm, I might play with this tomorrow and see if I can get something
working ...

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.


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

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.