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



On 10/10/2013 4:57 PM, Alan Cassidy wrote:

But I brought down my length for the two above fields to 160,000.

The job log message is MCH4216, and here is the message. My automatic
storage for the procedure does not add up to that high with the
lesser value, so what am I missing?


The automatic storage needed by your procedure comes from

1. the automatic variables you define in the procedure
2. automatic temporary variables added by the RPG compiler when it generates the code for your module
3. automatic temporary variables added by the system when it creates your module

The third category is associated with return values and parameters passed by value on actual call statements within the procedure. (And maybe other things, but I only know about the call impacts.) Each call will require its own set of additional automatic storage.

The amount of automatic storage required for a call is related to the size of the return values and the parameters passed by value. (Parameters passed by reference are also relevant, but the amount of auto storage for those is 16 each, since the parameter is actually a pointer.)

There are a couple of things you can do to reduce the amount of auto storage needed on a call:

- use RTNPARM if you are on 7.1. That will avoid the whole issue of a return value, from the system's point of view. It will cause the return value to be actually handled as an extra parameter.

- change VALUE to CONST for large parameters. If you need to change the parameter within the procedure, define a local variable and copy the parameter to the local variable, and modify the local variable instead of the parameter.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.