|
I recently read this article:
http://ibmsystemsmag.com/ibmi/developer/rpg/rpgle_recursion/
and was interested in this comment:
"Even though this procedure doesn’t return a value, it’s a good idea to
have a return statement on the end so the program can exit right away after
it reaches the end of MGACCM. Otherwise, it will unwind itself by going
from the Endif line to the end of the procedure for as many records as were
written."
What I've noticed is that each recursive call puts an entry on the call
stack, and at the end it "unwinds" down the call stack until it can exit
the subprocedure. I thought the author's comment above was addressing
that, but it made no impact on my test pgm.
Is that the expected behavior? I'm worried about a long-running job
running into a system limit. Does anyone know?
Thanks,
Phil
--
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.
As an Amazon Associate we earn from qualifying purchases.
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.