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



Barbara

Help me out here - I've always thought leaving *INLR *OFF means that on another call to the program, variables will have the values they had when the program ended before. Is this different with the MAIN keyword - remember, we don't compile to 7.1 (blushing!).

Thanks
Vern

On 9/24/2012 4:29 PM, Barbara Morris wrote:
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 ...

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.