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



I think Carel may be on the right track in saying we are losing the
address when we exit the procedure. I debugged in both environments and
found:

1. In the environment where the error is thrown, the flow is:
Execute procedure
%ALLOC
Exit procedure
Many calls into the procedure, we finally have data to store in the
array so we %REALLOC

2. In the environment where it works, the flow is:
Execute procedure
%ALLOC
We have data to store so,
%REALLOC
Exit procedure

So, even though the value in the pointer doesn't change, I am guessing
that leaving the procedure is resulting in us losing the address from
memory.

I'm going to have the programmer fix the logic so that we only do the
ALLOC and REALLOC when we actually find data to store in the array!
That may be it after all.

Thanks again.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, July 30, 2008 4:45 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: CEE0810 Error on Reallocate Statement

Who cares what the scope of 'wa' is?

The scope of 'arrayPtr' might be an issue -- if the symptoms were a
little different -- but I can't see how the scope of 'wa' could ever
matter!

At this point, I'm betting that either the memory has already been
dealloc/realloc or that there's memory corruption.

Kurt Anderson wrote:
Lorraine, just as a fyi, wa is scoped locally (to the procedure) as
opposed to globablly (to the service program). Sorry I don't have
anything otherwise helpful to pitch in here.


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.