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