|
One of our developers is running into a hard halt error, CEE0810, on areallocate statement. This is in a service program, which another
program is using CALLP to access. She has her pointer and array definedas follows:
to store in the array. So, if it's determined she needs to store
d array s 32a dim(32767)
d based(arrayPtr)
d arrayPtr s *
Does her initial allocation:
// allocate storage, if necessary
if wa = *zero;
wa = 100;
arrayPtr = %alloc(wa * 32);
endif;
And then reads records from a file using SQL. It's that data she's going
more than 100 elements, the program attempts to reallocate:instruction X'0000'
if b2 > wa;
wa += 100;
arrayPtr = %realloc(arrayPtr:wa * 32);
endif;
The reallocate fails with CEE0810:
The starting address for reallocation is not valid.
Function check. CEE0810 unmonitored by PGMNAME at statement 0000000855,
Could the problem be something like since this is a service program, and
No one has any idea what the problem is, research has turned up nothing.
it's on the 5th call to the service program that the reallocate logic isexecuted, somehow the program has lost the location of the original
allocation so it doesn't know where to go to reallocate? There's no otherlogic in the program that's manipulating the value of the pointer
other than the allocate and reallocate statements above.
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.