|
Lo, Have you tried defining the struct like this: _Packed struct host_struct { _Packed struct { short AOWL1_LEN; char AOWL1_DATA[2]; } AOWL1; _Packed struct { short AOWL2_LEN; char AOWL2_DATA[1]; } AOWL2; } hostds; This works for me. I haven't yet tried to return a result set so I don't know whether you can define hostds as hostds[20] or not. hth, Phil > I'm trying to write a C stored procedure that would return an array result > set, but precompiler generates the following message: > > SQL5011 30 19 Position 32 Host structure array AOW not defined or not > usable > > for the statement > > EXEC SQL > set result sets array :AOW for 20 rows; > > Host structure AOW is defined like this: > > _Packed struct { char AOWL1[2]; > char AOWL2; > } AOW[20]; > > Actually I found out the precompiler does not allow any of the structure > members to be arrays. The question is how in that case to return any > character strings to the caller. Or do I have to code it in to RPG? > > Lo > > ______________________________ > _______________________________________________ > This is the C programming iSeries / AS400 (C400-L) mailing list > To post a message email: C400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/c400-l > or email: C400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/c400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.