×
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.
A stored procedure would be a good solution.
Another way would be an UDTF (User Defined Table Function)
... but quite often program logic (like joining and grouping results) can
already be implemented within a view. So you neither need create and call a
stored procedure nor an UD(T)F, but can do a simple SELECT ... From VIEW
Where ... Order By.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Michael Ryan
Gesendet: Tuesday, 30. November 2010 15:53
An: RPG programming on the IBM i / System i
Betreff: Best Practice for Returning Multiple Rows from RPG to PHP
Ok...here's what I really want to know.
What is the best option for returning multiple rows of data from RPG to PHP?
Here's some of my considerations:
* I don't want to do complex processing in my PHP script; I'd rather use the
PHP to access and display data;
* The RPG program is needed because I'll be accessing multiple tables and
could be doing some complex processing;
* I need to return 1-n rows of data.
* I'm on V5R4.
When I look at a stored procedure, I see that I can return a result set.
However, I think I need to have an array or a multiple occurrence DS, which
makes me think I would need to know how many rows I would return. I was
thinking about a UDTF. Would that mean my RPG program would write (INSERT)
records to the UDTF and then my PHP script would just do a simple SELECT?
Does a global temporary table play in this?
I appreciate the insight. Thanks!
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: Best Practice for Returning Multiple Rows from RPG to PHP, (continued)
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.