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



Of course it is. This is in fact the normal way that parameter data is passed!

I'm not sure what you mean by hiding complexity, and what pointers could do for that... Regarding the need to get data back to pgmA, perhaps a procedure pointer could be passed, then used as a "callback" function. Your pgmB takes the callback pointer, calls the function, which runs the code from the pgmA module.

Simpler would simply to define a DS for feedback data, declare and initialize in pgmA, then pass that in to pgmB.

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Stefan Tageson
Sent: Wednesday, July 08, 2009 9:58 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Passing a pointer between programs when using a dynamic call

Hello,

Is it possible to use a pointer as a parameter when calling another program?
The program call has to be made up dynamically and executed using qcmdexec
or system API...
So no procedure calls.



Background: Program A (main program gets invoked and based on a number of
things creates an datastructure ( mostly with pointers to other things ).
Then pgm A decides what program to call ( program B ) and builds a call
string that is executed using qcmdexec. There will be many program B's

Program B gets invoked and need a mechanism to send back information to
program A. Just to hide the complexity of the datastructure in program A my
thought was to create a service program ( program C ) with procedures that
can be called by program B. It then seems reasonably that a pointer must be
used to "connect" the procedures in pgm C with the datastructure in pgm A.
Along the run it might be needed for program C to change pointers in pgm A
datastructure ( realloc of memory ).



Am I out on very thin ice here? Better solutions?



Best regards



Stefan Tageson

AddconIT AB

S:t Gertrudsgatan 3, SE-211 25 Malmö, Sweden

Cell : +46 (0) 732 36 99 34

<mailto:stefan.tageson@xxxxxxxxxxx> stefan.tageson@xxxxxxxxxxx



<http://www.addconit.se/> http://www.addconit.se/

--

Email is an excellent way to communicate material that is not time
sensitive.

If your communication is of a more urgent nature, please call.



-------------------- Internet e-Mail Disclaimer --------------------

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient you are notified that any use,
disclosure, copying or distribution of the information is prohibited. In
such case, you should destroy this message and kindly notify the sender by
reply e-mail.The views expressed in this e-mail and any attachments are
personal and, unless stated explicitly, do not represent the views of
AddconIT. Furthermore, AddconIT will not be bound by this e-mail.




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.