× 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 9/24/2012 5:16 PM, Robert J. Mullis wrote:
I am beginning to use the MAIN keyword in new programs. Do you still
need to set on *INLR before exiting the program, when MAIN is used to
defined the starting “point” of the programming. I haven’t seen any
manual or documentation that gives me the answer.


No, you don't need to set on *INLR. Setting on *INLR controls the RPG cycle, but a linear-main module doesn't use the RPG cycle.

The linear-main procedure will just end when it gets to the end of the calculations. You _can_ set on *INLR if you want, but it won't do any of the cycle-related things like closing files.

Here is a comparison of a cycle-main module and a linear-main module.http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frzasd%2Fsc09250802.htm

Conceptually, a linear-main module is much more like a NOMAIN module than it is like a cycle-main module. The only way it is similar to a cycle-main module is that it can be used as the program-entry module for a program.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.