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



Lim Hock-Chai wrote:
> 
> 2) Set on *LR on UEP module will close files that open by modules with
> *nomain keyword.
> 

No, the files in the NOMAIN module will never be closed until either you
close them explicitly with a CLOSE operation in that module, or the
activation group ends.  There is no *INLR anywhere that will cause the
files opened in the nomain modules to be closed, neither the *INLR in
the UEP module nor the *INLR in the nomain module.

For a module without a main procedure, the best way to close the files
is to have a "cleanup" procedure in the module that your UEP module can
call.  You could use CLOSE *ALL.

For a module with a main procedure, the best way to get the files closed
is to call the main procedure (with a prototype *) and with some special
parameter or no parameters, the same way as you might call a program to
get it to clean up.  You could also have a "cleanup" procedure in a
module with a main procedure, but I wouldn't recommend that because the
main procedure would still think was active, and would not go through
the *INIT part of the cycle the next time you called it, so it wouldn't
reopen the files or reinitialize your variables.

* The prototype for a main procedure doesn't have to have the EXTPGM
keyword.  If you leave off the EXTPGM keyword, the prototype can be used
to call the procedure with a bound call.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.