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



I am starting this in the Technical group instead of the RPG group because I
don't think it is an RPG specific problem.



I am foraging into the land of SQL stored procedures with nothing but Google
to help me and can't find an example of what I need.



I wrote an SQLRPGLE program that will be called by a stored procedure. It
has one IN parm and one INOUT parm for a "return" code that tells me what
happened (different values for different results, not just success or
failure status).



I have an SQLRPGLE program that will be executing the stored procedure on
various machines. I started with this statement and parm2 did have the
expected value.



Exec sql call machine1.myLib.myProc(:parm1, :parm2);



My problem is that the machines that it will be called on vary and are soft
coded in a driver file so I can't do hardcoded like this.



If machineToCall = 'machine1';

Exec sql Call machine1.myLib.myProc(:parm1, :parm2);

Endif;

If machineToCall = 'machine2';

Exec sql Call machine2.myLib.myProc(:parm1, :parm2);

Endif;



My thought was to build the string and do an "execute immediate from
:sqlstring" but I don't know how to deal with parm2 because it will no
longer be a variable. I considered have it return a one row result set but
that seems like a hokey work around.



I'm sure there has to be some way to do this and since I am writing the
entire thing from scratch, I can take it any direction that I need to.



Can someone provide some details of how to softcode the machine name on the
call with an input part and have it return a value?



Thanks.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.