How To Return Data Structure in SQLRPGLE Stored Procedure
Posted on 2010-08-12
I would like to use an SQLRPGLE stored procedure to return all the fields in a particular record, plus some other fields that I will add, to a web-based application. What I had hoped to do was a) define an externally-described data structure, based on the file that I'm using, and then b) define a field in the data structure that will be my returned record set using the LIKEDS keyword and referencing the externally-defined data structure.
My code looks like this:
D MSIADS E DS ExtName(@MSIA) Qualified
D OUTPUT DS DIM(1) QUALIFIED
D MSIA LIKEDS(MSIADS)
But when I tried to compile it, I got the message "Host structure array OUTPUT not defined or
not usable." from the SQL compiler.
Is it possible to do what I want to do, or should I try to work this out some other way?
Thanks very much for your help!