× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here's what works for me.  There may be something more elegant than explicit
offsets:

D                 DS
D QtyOH                          5S 0 Dim(125)
D  QtyOHS                 1    125S 0 Dim(25)
D  QtyOHN               126    250S 0 Dim(25)
D  QtyOHM               251    375S 0 Dim(25)
D  QtyOHW               376    500S 0 Dim(25)
D  QtyOHWW              501    625S 0 Dim(25)
D
D x               s                   like(qtyoh)
C                   for       x = 1 to 125
C                   eval      qtyoh(x) = x
C                   endfor
C                   eval      *inlr = *on

> -----Original Message-----
> From: Jim Langston [mailto:jlangston@celsinc.com]
> Sent: Thursday, February 21, 2002 1:05 PM
> To: 'rpg400-l@midrange.com'
> Subject: What is syntax for arrays within array?
>
>
> VARPG
>
> I have an array of 125 integers I am loading.  The first 25
> integers I want
> to have in a sub array, the second 25 integers I want in
> another subarray,
> etc...
>
> For example, integer # 27 I would like to refer to as either
> QtyOH(27) or
> QtyOHN(2).  This is what I have tried (which didn't work):
>
>      D                 DS
>      D QtyOH                          5S 0 Dim(125)
>      D  QtyOHS                        5S 0 Overlay(QtyOH)     Dim(25)
>      D  QtyOHN                        5S 0 Overlay(QtyOH:26)  Dim(25)
>      D  QtyOHM                        5S 0 Overlay(QtyOH:51)  Dim(25)
>      D  QtyOHW                        5S 0 Overlay(QtyOH:76)  Dim(25)
>      D  QtyOHWW                       5S 0 Overlay(QtyOH:101) Dim(25)
>
> The first error I get for QtyOHS is:
> RNV3732E Array keyword is not allowed with keyword OVERLAY; keyword is
> ignored.
>
> For each of the additional sub arrays I get that error and an
> additional
> one:
> RNV7303E Subfield QTYOHWW defined with keyword OVERLAY is too big;
> specification ignored.
>
> Do I have to do some trick with Based and pointers or something?
>
> I tried searching the archives for array DIM Overlay but
> didn't see anything
> too similar to this.
>
> Regards,
>
> Jim Langston
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.