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



Jim Wiant wrote:
Program A eventually sets *INLR on when it exits.
But the file program B opened stays open.

Yes... that's what's supposed to happen. Setting on *INLR in program A has nothing to do with program b. If you want program B's files to close, you need to set on *INLR in program B!

Or you need to end the activation group.

If you compile Program A with ACTGRP(*NEW) and Program B with ACTGRP(*CALLER) then when Program A ends, it'll automatically end the activation group (which in turn will close down program B)

If you want Program A to be called many times without closing it's files, you can accomplish the same thing by specifying ACTGRP(SOMENAME) with Program A, and leave Program B with ACTGRP(*CALLER). Then, the files won't be closed until you run RCLACTGRP SOMENAME. That's more efficient than ACTGRP(*NEW) -- though if it'll only be called once, I find ACTGRP(*NEW) much more elegant.

If you want to avoid activation groups and pretend that it's still the 1980's, you can code a special parameter to ProgramB to tell it to turn *INLR on, which will close it's files.


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.