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



This is totally different than how I've always worked. I always have one module that does *not* specify NOMAIN and all the rest of the modules used in a given program do specify NOMAIN. By specifying NOMAIN for a module the RPG cycle code is not generated AFAIK.

That's true. If if you specify NOMAIN it won't have a main procedure or RPG cycle code. (And therefore, setting on *INLR in that module will have no effect.)

Conversely, if you hadn't specified NOMAIN, setting on *INLR would have an effect if you got to the right point in the cycle.

That's all I'm saying.


At the very least specifying NOMAIN means that a PEP cannot be created for that module. I cannot for the life of me imagine a situation where a program would be created from multiple modules that do *not* specify NOMAIN, thereby allowing multiple PEP candidates (and multiple RPG cycles).

You're getting the PEP confused with the UEP. The UEP will be the main procedure of the module that you specify with ENTMOD() on the CRTPGM command. The PEP is generated by the compiler, and isn't code that you wrote in any of your modules.

Also, let's try to avoid turning this into a thread about what someone should or shouldn't do. Yes, it may be a good idea to design your programs so that they always have only one module with a main procedure -- but that's an opinion of how to design a program, it's not a statement of how the language closes files when *INLR is on.

AFAIK the RPG *does* "operate at the program level". Can you give an example of a program that uses multiple non-NOMAIN modules?

Huh? What do you mean by "RPG does operate at the program level"? Do you mean that *INLR operates at the program level? That's what I was talking about.

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.