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



Joep,

I went with the based structure because if they actually used all 50
members, in all 300 files the big data structure wasn't big enough.
(50members * 10 byte names) * (300 files) + (300 files * 10 bytes names) =
153,000 bytes.  This is the compile error I was trying to avoid.

Maybe he was trying to code for the pointer phobic - of which I used to be
in that camp - but I've seen the light.

Defining it for a length of 32766 is like ignoring truncation on numbers
<vbg>

Rob Berendt

==================
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin



                    "Joep Beckeringh"
                    <joep@beckeringh.       To:     <RPG400-L@midrange.com>
                    myweb.nl>               cc:
                    Sent by:                Fax to:
                    rpg400-l-admin@mi       Subject:     Re: Big complex 
parameter.
                    drange.com


                    12/12/2001 05:59
                    PM
                    Please respond to
                    rpg400-l






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