Page 1 of 1

out of memory error

PostPosted: Sat Nov 15, 2008 4:17 pm
by atodpquery
I have this IRX00051 error running a REXX program. I read the manual that suggests two solutions, one is to increase the virtual memory size or to split the files. Can you give me an idea what's going wrong here. Is it problem from reading the stem or the problem is from adding record to the stem.

If that is the problem of adding record to a stem then can we have two stems or it does not help because the size alloccated to each user's limit is reached. any suggestions to solve the problem?

Here is the run time message
IRX0005I Error running PROGRAMXX, line 839: Machine storage exhausted
ISPD117
The initially invoked CLIST ended with a return code = 20005
NULLFILE was preallocated (no free was done).

Re: out of memory error

PostPosted: Sat Nov 15, 2008 11:17 pm
by dick scherrer
Hello and welcome to the forum,

When you have a question you need to start a new topic for your question rather than posting a reply to some existing un-related topic.

As the error says - you have run out of memory. Either the code is trying to bring more into storage than you are permitted or there is a problem in the code that cause this (i.e. a loop). As the message also says you need to be permitted more memory (not usually permitted - the limit is there for a reason) or you need to reduce the volume.

REXX/Clist are not good tools for working with large files.

Re: out of memory error

PostPosted: Sun Nov 16, 2008 4:42 am
by atodpquery
Hello,

Thanks for the direction. It actually happens inside a loop. What action I takes to identify is the size or loop problem. If it is size problem then may be directly write to the file will do. If it is inside a loop and what are the actions can solve the problem. why a loop will cause this problem. Thanks.

Re: out of memory error

PostPosted: Sun Nov 16, 2008 6:54 am
by dick scherrer
Hello,

why a loop will cause this problem.
As the code repeats the loop, more memory is required.

What action I takes to identify is the size or loop problem
If it runs for a few records (make a tiny test input file and try it) and fails with full volume, it is probably because of the incrementally required memory because of processing the file. If it will not run at all due to memory, it is probably too large. One other consideraton is that if the code has a problem and goes into a loop that requires more and more menory, this could also cause the problem. You should be able to isolate which is happening with a few tests. If it appears to be in a loop, you may want to include some diagnostic code to help you debug.

If it is size problem then may be directly write to the file will do
Possibly, but if the problem is due to volume, you should probably look for a way to run your code in batch and possibly use a language better suited for file processing.

Re: out of memory error

PostPosted: Mon Nov 17, 2008 4:30 am
by atodpquery
Can you tell me what diagnostic test that I can put into a loop that can help me to determine the problem before I can derive a solution.

Trace on and off etc.

Re: out of memory error

PostPosted: Mon Nov 17, 2008 8:46 am
by dick scherrer
Hello,

You might insert a few SAY statements to track what is happening in your code. You might also look at TRACE.