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



Alan,
I ran into this problem way back.
The problem was that he program made copious calls to a procedure which returned data into a variable length field as a return rather than as an IO parameter.
I can only vaguely recall advice from Barbara on this forum but in essence, use of a varying length return value appeared to cause automatic storage to creep up after each procedure call.
Thus, the exception was intermittent, only occurring when there was significant nesting to cause the procedure to be call many times.
Changing from a return value to an IO parameter fixed the problem

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, 11 October 2013 10:41 a.m.
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Automatic storage for procedure exceeds maximum.

Alan,

The automatic storage maximum is not a limit for a particular procedure, it's a limit for the entire call stack! So the total of all automatic storage in memory for your entire call stack is (approx) 16 mb.

I don't know why this would cause the compiler to blow up, tho. Unless, of course, you actually have already allocated so much memory in automatic storage that when the compiler runs, it's own storage happens to be the "straw that breaks the camel's back" -- i.e. it just happens to use enough automatic storage that when added to what you already have in memory, it will overflow the maximum.

When you are working with very large buffers, I would strongly recommend to do one of the following:

1) Use teraspace. The limit becomes MUCH higher.
-or-
2) Allocate large buffers from the heap instead of automatic storage.

Does that help?


On 10/10/2013 3:57 PM, Alan Cassidy wrote:
I looked this up in the manual and I can't find an automatic storage maximum.

I'm trying to do a LOT inside a procedure with IFS files, and I defined my buffers pretty big.

One buffer to read in from the IFS. I first defined it with a little less than the 16 meg max, trying to get it in one chunk.
But I also had another holding area defined with (a little less than) 16 meg.

But the compile "blew up", meaning it abended with the above error, and produced a service dump, a job log printout, and a QDSPJOB printout. The compile listing has a message at the bottom, An error occurred during translation.

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?

--Alan



Message . . . . : Automatic storage for procedure exceeds maximum.
Cause . . . . . : The object was not created because an internal system
limit was reached. Not enough automatic storage was available to allocate a
data object within a procedure. Recovery . . . : Reduce the number or
size of automatic data objects within the procedure. Technical description .
. . . . . . . : The current offset in automatic storage of the next
available byte is 16775616 bytes and the maximum offset is 16776703 bytes.
The number of bytes required to allocate the data object is 160004. The
dictionary index for the data object is 340, the dictionary entry is
X'080400010000017C00000000000271040000001D000000007000800080010000', and the
offset to the dictionary entry is 10900 bytes. The dictionary index for the
procedure is 0, the dictionary entry is
X'0000000000000000000000000000000000000000000000000000000000000000', and the
offset to the dictionary entry is 20 bytes. The VLIC log note ID is
0501E617.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Cassidy
Sent: Thursday, October 10, 2013 3:23 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: The essence of RPG ( was Free format H, F, D and P specs)

This one is a good encapsulation of the rest of them, I think...
"..It is the continuing evolution and betterment provided by IBM that keeps the language relevant and useful..."
...without deprecating very much, either...

You can please some of the people all of the time, and you can please all of the people some of the time, but you can't please all of the people all of the time!

--Alan


----------------------------------------------------------------------
---------- Confidentiality Notice: This email may contain confidential
information or information covered under the Privacy Act, 5 USC 552(a), and/or the Health Insurance Portability and Accountability Act (PL 104-191) and its various implementing regulations and must be protected in accordance with those provisions. It contains information that is legally privileged, confidential or otherwise protected from use or disclosure. This e-mail message, including any attachments, is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Thank you.
----------------------------------------------------------------------
----------


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.

#####################################################################################

This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda.
If you need assistance, please contact Veda on either :-
Australia 1300-762-207 or New Zealand +64 9 367 6200

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.