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



-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Mark S. Waterbury

DFTACTGRP solution
=================
Assuming all of these *PGMs are in fact running in the
*DFTACTGRP, then you can just issue:

RCLRSC LVL(*)

in PGM1(CLP), right after the CALL to PGM2 returns to PGM1.
This will close all open files and end all active programs
below the current level in the call stack.

NOTE: if somehow PGM4 or PGM5 were not compiled with CRTBNDRPG ...
ACTGRP(*DFTACTGRP) then this will not work. :-o

Thanks Mark. Pgms 4 and 5 are compiled to run in ACTGRP(*CALLER). PGM1 issues a RCLRSC at the end. I tried adding this after the call to PGM2 but it didn't work.

PGM1 does an OVRDBF CLIENTFILE to qtemp/clientfile, then returns to a menu. Another menu option will take me to PGM1b which will also call PGM5 along the line. At this point, although the OVRDBF CLIENTFILE is no longer active, qtemp/clientfile remains open and PGM5 continues to use it instead of CLIENTFILE which is in the *CURLIB.

Any thoughts?


Named Activation Group solution
=========================
Another alternative would be to convert all of the called OPM
programs to ILE -- CLP to CLLE, and RPGIII to RPGLE, and
create PGM2 with a named activation group, e.g. ACTGRP(PGM2)
... and create all the programs it calls with
ACTGRP(*CALLER). Then, when PGM2 returns to PGM1, PGM1 issues:

RCLACTGRP ACTGRP(PGM2)

This is one of the main benefits of using ILE with named
activation groups -- you can control termination of a named
activation group far more easily than with RCLRSC in "OPM
compatibility mode" (in the *DFTACTGRP).

I'll save this for later. But we need a fix now!

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.