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