Chuck, you're talking about turning the DS-array into rows, right?
Meaning you'd still have to do a temporary table like in QTEMP using embedded SQL, and use that to return as a result set, or for the Defined Table Function? A table function has to be an actual table, after all...
My first thought was that you cannot directly plop re-define such a structure directly to a result table, but I've been surprised before...
Alan
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Thursday, October 17, 2013 6:47 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: [possible spam] Re: Can I create a SQL Cursor out of a DS Array
Importance: Low
On 10/17/13 8:43 AM, Sarvapriya Tripathi wrote:
That is why I wondered if there could be a work around by creating
Cursors out arrays.
The work to generate each /array/ result-set could be reworked to provide results as a returns-table of a User Defined Table Function (UDTF), and then the program returning the result sets would declare the cursor for the: SELECT ... FROM TABLE(the_udtf()) AS Cor_Nm
--
Regards, Chuck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
--------------------------------------------------------------------------------
Confidentiality Notice: This email may contain confidential information or information covered under the Privacy Act, 5 USC 552(a), and/or the Health Insurance Portability and Accountability Act (PL 104-191) and its various implementing regulations and must be protected in accordance with those provisions. It contains information that is legally privileged, confidential or otherwise protected from use or disclosure. This e-mail message, including any attachments, is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Thank you.
--------------------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.