Yup...had it before the Set Option statement. Now it's complaining
about my array...always something.

On Tue, Apr 17, 2012 at 4:32 PM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:
Hmmm...can't seem to get the Set Results Set correct...getting an
SQL0084 - SQL statement not allowed. Maybe in the wrong place?

On Tue, Apr 17, 2012 at 4:23 PM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:
Like this Scott?

   D myReturnData...
   D                 DS
   D                                                Dim(100)
   D     WOTran                    16  0
   D     WOINVTH                    2  0
   D     WOMA                         1

On Tue, Apr 17, 2012 at 4:14 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx> wrote:

The DIM has to be on the DS definition (not on a subfield definition).
IIRC, this support requires V5R3 (it was available in RPG in V5R2, but I
don't think it worked in SQL until V5R3)

DIM on a subfield won't work in any release.

On 4/17/2012 1:35 PM, Michael Ryan wrote:
Do I need to use a MODS to return a result set from an RPG program
(V5R4) or can I use arrays within a DS? IOW, if I use this:


Can MyReturnData be this:

      D myReturnData...
      D                 DS
      D   WOArray                           Dim(100)
      D     WOTran                    16  0 Overlay(WOArray)
      D     WOINVTH                    2  0 Overlay(WOArray:*Next)
      D     WOMA                         1     Overlay(WOArray:*Next)

Or does it have to be this:

       D                DS                  Occurs(100)
      D     WOTran                    16  0
      D     WOINVTH                    2  0
      D     WOMA                         1
      D     WOINVT                     2


This is the RPG programming on the IBM i / System i (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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].