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



Thanks for the link, Gad. The article doesn't say anything about linear-main programs calling themselves, but it has a link in it to https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasc/recursvhtm - this has more about calling linear-main recursively, which expands on what I found about a recursive call of a linear-main program is a dynamic program call. Here is that expansion -

Recursive calls are also allowed for programs whose main procedure is a linear-main procedure. A linear-main procedure can only be called through a program call, so when a linear-main procedure calls itself recursively, the program containing the linear-main procedure is called again. Otherwise, the behavior for a linear-main procedure calling itself recursively is the same as for an ordinary subprocedure calling itself recursively.

Regards
Vern

On 11/3/2024 1:00 AM, Gad Miron wrote:
Procedures CAN be called recursively

https://blog.faq400.com/en/programming/recursive-calls-in-ile-rpg-and-sql-part-1/

Gad


from: Eric Wesson<fjwesson@xxxxxxxxxxx>
subject: Re: When ctl-opt main() is missing...

I'm curious... if you have a linear pgm with a control spec of main
pointing to a procedure, can that pgm be called recursively like sub
procedures can?
________________________________



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.