× 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 would suggest writing a UDTF, and letting the other RPG programs grab the data via an SQL statement.

The other alternative that I'd consider is loading the data into an DS array, and returning the array through the parameter list to the calling program.

I would never consider sharing the user space. If you do that, you're not insulating the calling programs from the API's logic at all... so your program that calls the API is just increasing the amount of code without encapsulating anything.

I would also modernize that code you linked to... it's still using RPG III from/to positions in the data structure, and the nasty B data type for subfields. It's also copying the data from the user space into the program rather than just referencing it directly from the user space, which makes the program run slower.

That's my 2 cents.


On 8/10/2011 3:21 PM, Jack Tucky wrote:
What's the best way to let other RPG programs use this program to get a list
of objects? Should I return the user space name and define the DS in my
calling program?

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.