× 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 2/14/2013 4:57 PM, CRPence wrote:
On 14 Feb 2013 11:26, Rory Hewitt wrote:
<<SNIP>> As far as reaching a system limit <<SNIP>> it would simply
be the maximum number of recursions - I don't know what that is, but
I'd guess its probably 65535.

I do not recall a specific number, but IME a limit was generally
reached by exceeding the storage limit for the available PASA in the
combined stack frames; i.e. a numeric limit could not be reached. Such
a process experiences a painful death because the cancel handlers
generally require their own automatic storage, but those too would be
unable to operate [because no space was reserved for them]. That
experience has taught me that whatever is to be done recursively would
best be designed and coded to minimize consumption of PASA.

The RPG Reference, Appendix A (Restrictions) makes no mention of
recursion. However, the section on Calling Programs and Procedures has
a section entitled Program/Procedure Call Overview and in that is a
section entitled Recursive Calls:
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/topic/rzasc/sc092507155.htm
It says

'So while subprocedures can be called recursively, if you are not aware
that recursion is occurring, you may exhaust system resources.
Attention!

Unconditional recursive calls can lead to infinite recursion which leads
to excessive use of system resources. Infinite recursion can be avoided
with proper programming. In general, a proper recursive procedure begins
with a test to determine if the desired result has been obtained. If it
has been obtained, then the recursive procedure returns to the most
recent caller.'

No wonder Chuck couldn't find a hard number. There does not appear to
be one. The same verbiage is in the 5.4 Reference as well as 7.1.
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.