When running ILE Programs in the default activation group with *LR=ON, the
files get closed, but the program itself will be not removed from the
storage until the job ends (i.e. the default activation group gets closed).
RCLRSC will not remove the ILE programs either, it will only reinitialize
allocated storage for ILE programs while it reclaims OPM programs!
The next time the ILE program gets called within the same job, the files
will be opened again and the already allocated storage get initialized.
Even worse when running service programs with I/O operations within the
default activation group and executing RCLRSC.
The files get closed, but the service program still thinks they are opened
... and there is no way to trap the error, neither with %OPEN, nor with
%ERROR the service program will fail with MCH3601.
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 17:13
An: RPG programming on the IBM i / System i
Betreff: RE: AW: program won't let go of file
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Mark S. Waterbury
Envoyé : mardi 7 septembre 2010 16:55
À : RPG programming on the IBM i / System i
Objet : Re: AW: program won't let go of file
Hi, Birgitta:
What you describe for the behavior of LR in RPG IV is true
when the RPGLE program was *not* compiled with:
CRTBNDRPG ... ACTGRP(*DFTACTGRP)
I was just going to reply to Birgitta. I've tried coding PGM5 so it always
returns with LR on and then I no longer have the file open.
Now I am confused.
We use crtpgm actgrp(*caller) with the first caller always in *dftactgrp.
Could that make it behave differently? I will try CRTBNDRPG PGM5
ACTGRP(*DFTACTGRP)
As an Amazon Associate we earn from qualifying purchases.