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



This guy is passing a list within a list that has a list in it.
He is not passing a simple ELEM list which has the 2-byte binary prefix
and then the 3 elements. Note the 3rd element in his example, has
MAX(300) in addition the ELEM parent has MAX(300) specified.

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 Joep Beckeringh
> Sent: Wednesday, December 12, 2001 5:00 PM
> To: RPG400-L@midrange.com
> Subject: Re: Big complex parameter.
>
> Bob,
>
> Why use %SUBST?  I'd make ElemItem a based structure.  (I have a
utility
> with a parameter like that.  In the original version I processed it in
CL.
> Brr.)
>
> Joep Beckeringh
> 45/15; love the cycle
>
> ----- Original Message -----
> From: "Bob Cozzi (RPGIV)" <cozzi@rpgiv.com>
> To: <rpg400-l@midrange.com>
> Sent: Wednesday, December 12, 2001 5:24 PM
> Subject: RE: Big complex parameter.
>
>
> > 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
>
>
>
>
>
> _______________________________________________
> 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.