|
I'd second the recommendation for a UDTF...
Much more flexible than a SP returning a results set..
Charles
On Wed, Apr 30, 2025 at 9:55 AM Daniel Gross<daniel@xxxxxxxx> wrote:
Hi Buzz,
you can find some info in the Info Center:
https://www.ibm.com/docs/en/i/7.5.0?topic=procedures-returning-result-sets-from-stored
But from a modern view of SQL I wouldn't recommend using a stored
procedure returning a result set.
IMHO a user defined table function is the better and more modern "attack
vector" as you can use the UDTF anywhere in any SQL query, where a table is
usable.
https://www.ibm.com/docs/en/i/7.5.0?topic=code-example-weather-table-function
https://www.itjungle.com/2016/06/14/fhg061416-story03/
For external (RPG) UDTF Scott has created some very nice docs:
https://www.scottklement.com/udtf/
HTH and kind regards,
Daniel
Am 30.04.2025 um 17:05 schrieb Buzz Fenner via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>:
I've gotten the go-ahead to do a POC for creating SQL stored proceduresthat returns a result set(s) to an RPG-ILE array. My searches for articles
and code haven't turned up any "complete" articles (although I've hit on
snippets from Jon, Birgitta, etc.).
Anyone know of any good end-to-end articles that I can read to get up tospeed?
--Buzz--
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email:MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:https://lists.midrange.com/mailman/listinfo/midrange-l
or email:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
athttps://archive.midrange.com/midrange-l.
Please contactsupport@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.