× 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.



When you have a complex mixed list, it is passed something like this:

D Elems        DS        32766
D  Count                     5i0
D  offset                    5i 0   Dim(300)


The first COUNT field tells you how many elements were passed.
Then, an array of 2-byte binary integers are passed.
Each one contains an offset to an element on your list.
These offsets (if memory serves) are passed in backwards order,
last-first.
So if Offset(1) = 347, then in position 347+%size(count) would be the
first element on your list. You use %SUBST to access:

 %SUBST(Elems: offset(x)+%size(count): %size(target))

Where TARGET is probably another data structure whose format matches the
element list. Element lists are passed as

D ElemItem    DS
D  eCount                     5I0   /* Not really needed */
D  item1                     10A
D  item2                     10A
D  item3                     10A


So each OFFSET would "point" to a bucket that contained an ELEMITEM set
of data.

Now, all of this is from memory so check it out in that old issue of Q38
if you can get a copy from John Carr.

Bob Cozzi
cozzi@rpgiv.com
Visit the new on-line iSeries Forums at: http://www.rpgiv.com/forum

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On
> Behalf Of bmorris@ca.ibm.com
> Sent: Wednesday, December 12, 2001 10:07 AM
> To: rpg400-l@midrange.com
> Subject: Re: Big complex parameter.
>
>
> >From: rob@dekko.com
> >Date: Wed, 12 Dec 2001 09:52:04 -0500
> >
> >     D FileMbrListDs   DS
> >RNF0501E Length of character item FILEMBR... exceeds 65535; length
> defaults
> >to 65535.
> >     D  eFileMbrList                  5i 0
> >     D  aFileMbr                    +10    dim(300) like(MbrListDs)
> >     D   File                        10a   overlay(aFileMbr)
> >     D   MbrListParm                       overlay(aFileMbr:*next)
> >     D                                      like(MbrListDs)
> >     D MbrListDs       DS
> >     D  eMbrList                      5i 0
> >     D  MbrList                      10a   dim(50)
> >...
> >
> >Any suggestions on the workaround for the RNF0501E message?
>
> Rob, this is untested, but I think something like this should work.
>
>      D FileMbrListDs   DS
>      D  eFileMbrList                  5i 0
>      D  firstElem                     1
>
>      D MbrListDs       DS                  based(pMbrList)
>      D  eMbrList                      5i 0
>      D  MbrList                      10a   dim(50)
>
>      C          for      elem = 1 to eFileMbrList
>      C          eval     pMbrList = %addr(firstElem)
>      C                            + %size(MbrListDs) * (elem - 1)
>      C ... process eMbrList and MbrList
>      C          endfor
>
> I can't remember if the next MbrListDS follows immediately after
eMbrList
> entries.  If so, you'll have keep a running pointer, and set it
according
> to the size of the previous entry.  If that's the case, be careful not
> to set it after processing the last element, or you run the risk of
the
> occasional MCH0601.
>
> Barbara Morris
>
> _______________________________________________
> 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-Ups:
Replies:

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.