|
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
As an Amazon Associate we earn from qualifying purchases.
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.