|
Hi, Joe:The cool thing about *NEW is that you don't have to specify *INLR = *ON. You can leave it off, and everything is cleaned up when the AG exits. I've used this extensively; it completely replaced my old cleanup utilities. I actually had a small driver that all subprograms registered with; the driver would then call them to clean themselves up when the top-level program ended, but I don't need that with *NEW/*CALLER.
If it was my shop or my decision, I would try something like this first.
1. ensure that each top-level RPGLE program always returns with *INLR = *ON (so that it closes all files, etc.) and specify ACTGRP(*NEW) as was suggested previously. That way, each time the program exits, the AG gets cleaned up. Then see if any users complain about the extra time it takes when they return to a menu option they have visited recently.
2. if many users complain, then you could change the above to ACTGRP(named) and set *INLR = *OFF. Then, you leave everything open, as you are doing now.
2.(a) you might even want to replace those "top-level" programs with small CL programs that call the previous "top level" program, and on return, it could pop-up a window to ask the user if they plan to re-use this menu option within the next 5 minutes. If they answer "No", it could then issue RCLACTGRP ACTGRP(name) ...?
(This lets the user decide whether to leave the files open or not.)
As an Amazon Associate we earn from qualifying purchases.
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.