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



Hi Scott,

Do you REALLY mean that a procedure defined with the MAIN keyword can only be a program-entry procedure? Or is it just a main procedure with no cycle? Surely CRTPGM won't give you an error if you have a procedure defined with MAIN that isn't the UEP?

CRTPGM won't care, but the prototype for a "linear-main" procedure has to be defined with EXTPGM, and the procedure itself isn't exported from the module. So, since you can't call it any way other than by a program call, it won't make any sense to have a linear-main procedure that isn't also a program entry procedure.


2) A procedure can have its own local files; even if it's a cycle module, the local files have their own rules about when they get closed, nothing to do with LR: automatic files get closed when the procedure returns, and static files never get closed.

Static files NEVER get closed? Never ever? Not even when the activation group ends? Or the job ends? Or during an IPL? Or when you wipe your DASD clean and reinstall from scratch? How about when your system is vaporized by a ray gun from a little green alien from outer space? Even then the files stay open?

"What, never? Well, hardly ever." Yep, you're right. Static local files get closed in all the same circumstances that files in NOMAIN modules get closed. I'm not sure about the vaporizing case ... do you think the files would get closed before they got vaporized?


Am I taking you too literally? Heh.

Maybe a little. Double heh.


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.