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



LR in RPGIII is not the same as LR in RPGIV.

In RPGIV it depends on the activation group if the program is completely
removed or not.
As long as the activation group in which the program runs is active, your
program is in the memory.
A RPGIV program running in the default activation group cannot be removed,
because it is not possible to reclaim the default activation group.

Instead of moving LR on, you need to run your RPGIV program in a named
activation group and reclaim this activation group instead of executing LR.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von David FOXWELL
Gesendet: Tuesday, 07. September 2010 16:06
An: RPG programming on the IBM i / System i
Betreff: program won't let go of file

Hi all,


Our RPG OPM's always had a parameter ReturnType so that we could instruct
them to return with either RT or LR on. At the end of processing, the caller
would use a cleanup routine to call all the programs that had been
activated. The called programs would then just set on LR and end.

For some reason unbeknown to me, this method was not used with RPGIV
programs.

Now, this (simplified)situation has "evolved" :

PGM1(CLP)
PGM2(RPGIII)
PGM3(RPGIII)
PGM4(RPGIV)
PGM5(RPGIV Converted from RPGIII)

Everything is running in DFTACTGRP.

When PGM2 is finished, it will call PGM3 with ReturnType to tell it to
switch on LR and return. PGM4 does not have this facility and always returns
with LR off. As it does not know what PGM3 is doing, it never calls PGM5 to
tell it to set on its LR indicator and its files stay open.

On returning to PGM1, I need PGM5 to be freed up. A file it uses is staying
open. The boss says to issue a call from PGM2 or PGM3 to PGM5 to get it to
switch on LR. I don't know if that would even work, would it? Even if it
did, there are other RPGIV called by PGM5 that would probably give the same
problem. How do I get out of this mess?


TIA.

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.