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



Thank you. I wasn't aware of the boundary issue, or if I saw it somewhere,
I didn't understand what it meant. I get it now. I ended up separating
the data structures, rather than trying to overlay as I was, so that the
pointers can have there own area. It slightly complicates the table
maintenance, but so would having the compile blow for someone trying to
adjust the size of the text fields and not understanding why the compile
failed.





Joe Pluta
<joepluta@plutabr
others.com> To
Sent by: RPG programming on the IBM i /
rpg400-l-bounces@ System i <rpg400-l@xxxxxxxxxxxx>
midrange.com cc

Fax to
05/28/2009 01:05
PM Subject
Re: Table based calls with
Procedure Pointers in datastructure
Please respond to array 31 bytes
RPG programming
on the IBM i /
System i
<rpg400-l@midrang
e.com>






I'm not sure about the binding errors, but the root of your problem is
probably that pointers need to be on a 16-byte boundary. Thus, the data
structure definition padded the first field out to 80 chars. Possible
fixes to that issue: change the first field to either 64 or 80, or add a
filler field of 15 characters. You could put the procptr first, but you
would then end up with 85-character data structures and if you butted
those up against one another contiguously, you'd end up with misaligned
procptrs. Now, the fact that you're using overlay(*next) may fix that
under the covers, but I wouldn't want to bet the farm on it.

Me I'd go with padding the data structure out to 96 using a filler field.

Joe


I have the below source. I'm trying to design a number of subprocedures
that will be called in sequence, and checked off interactively in a
subfile
with the results of each call. Now, when I compile this with CRTBNDRPG,
I
see in the compile listing that TLDS is 96 bytes. That indicates that
the
procptr is consuming 31 bytes of storage when I expected 16. The compile
fails with RNF7303 - Subfield defined with keyword OVERLAY is too big.
The
subfield is TL_p. I can make the TLarr array 96 bytes, but I then get
Binding errors without much explanation, so I'm not sure what's going on.

Can I use the extproc keyword on a local subprocedure? If not, is there
a
better way to do this?





D TLCnt C 1
Number of tests
D TLDS DS
D 65 inz('POSTCV1C - CIC(ICTYP)')
D * procptr INZ(%paddr
('POSTCV1Ca'))
D
D TLarr 81 overlay(TLDS) dim(TLCnt)
D TL 65 overlay(TLarr)
D TL_p * procptr overlay(TLarr:*next)

D $VldDta_p S * procptr
D $VldDta PR like(RtnInd) extproc
($VldDta_p)
D
D $POSTCV1Ca PR like(RtnInd)

$VldDta_p=TL_p(RRN01);
RtnInd=$VldDta();



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 ...

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.