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



midrange-l-request@xxxxxxxxxxxx wrote:

  2. How to call a remote program and getting a return value into
     a passed  parameter? (Charles St-Laurent)

date: Mon, 21 Aug 2006 11:16:33 -0400

I want to call a program on a remote server. The remote call looks like
this:

CALL MY_PROGRAM PARM(PARM1 PARM2 PARM3 PARM4)

The three first paramters are passed with a value and the last one is blank.
So I want this CALL to be executed on the remote machine I want to receive
the PARM4 value back on my local machine...

What is the simplest way to do so?

Thanks in advance for your answers

Charles:

"Simplest" way is probably via a stored procedure in SQL. I assume "simplest" 
means something along the lines of "getting it to work with least effort or 
least time start to finish". "Simplest" might change radically in different 
environments.

In order to _return_ a parm value, you will need to create a stored procedure 
definition on the target system for each program that you want to call. All of 
it can be done without having the SQL product installed, but things get less 
"simple".

Apart from actual SQL, there are numerous other ways to get it done. One way 
that most seem unaware of:

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/apis/qxdaprog.htm
or
http://makeashorterlink.com/?X43A23C9D

That API has been around since V4R4 I think. I'm not sure if it works as 
documented yet. The link is to the V5R1 InfoCenter and I haven't played with it 
since V5R1. I made a _bunch_ of calls to Support at that time (but it is 
supported, so that doesn't make it out of reach).

The API can be very useful during testing because it can adapt nicely for 
authentication to the local system in place of the remote. Also, although it is 
_related_ to SQL, it isn't "SQL".

Other options exist beyond that.

Tom Liotta


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.