× 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, David:

See embedded remarks below.

> David FOXWELL wrote:
Hi,

I'm using a CLP that runs a test on 1 or more other CLP, RPG and RPGLE. After calling the CLP and one of the programs crashing, I find myself having to SIGNOFF because one of the RPGLE hasn't let go of a file. This is standard shop procedure! Understanding a little more about activation groups, I found that the files remaining open were in *DFTACTGRP.

I just had the idea to change the initial CLP to CLLE. All our RPGLE are compiled with ACTGRP *CALLER, although we do not yet use activation groups. My idea was that if my calling CLLE was compiled with ACTGRP *NEW, I'd no longer have this problem of files remaining open.
Your proposal of changing the top-level program from CLP to CLLE and specifying ACTGRP(*NEW) should work.
When called from CLP (or any OPM *PGMs), a called program will run (get activated) in the *DFTACTGRP if it specifies ACTGRP(*CALLER) or DFTACTGRP(*YES).

DFTACTGRP(*YES) creates an "OPM compatible" ILE *PGM whose resources can be reclaimed with RCLRSC. But ACTGRP(*CALLER) creates a true ILE *PGM that is not meant to run in the *DFTACTGRP, and RCLRSC cannot reclaim its resources (e.g. close files opened by that program), etc. -- this is what led to your problem. ILE programs created with ACTGRP(*CALLER) are never supposed to be run in the default activation group, by design.

You might also want to consider using "named" activation groups. You could specify ACTGRP(name) on the CRTBNDCL command, where "name" is the same as the top-level program name. This activation group will be created the first time this program is called, and remains active until end-of-job, or until you issue:

RCLACTGRP ACTGRP(name)
This could perform better than using ACTGRP(*NEW), which forces termination of the activation group each time that top-level program exits, closing all files, etc., depending on how often your users exit and then re-enter the menu options that call this particular top-level program. This is also handy for "debugging" purposes. Instead of having to sign-off and on again, you can just issue: RCLACTGRP ACTGRP(name)

Perhaps when your applications were originally all OPM (CLP and RPG/400), you may have used RCLRSC in the "top level" program to close all files, etc.-- in that case, your idea of using ACTGRP(*NEW) might better emulate that behavior.
Now, when I press option 14 I note that the default value is ACTGRP *STGMDL STGMDL(*SNGLVL) which means running in QILE. What is the point of this?
I think you meant to say you typed PDM option 14 next to the CLLE source member, then pressed F4=Prompt. This prompts the CRTBNDCL command (or CRTBNDRPG, etc. depending on the member type). But, if you specify ACTGRP(*NEW) as you suggested above, you cannot specify ACTGRP(*STGMDL), because you specified *NEW instead.

Hope that helps.

Mark S. Waterbury

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.