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



Well that's what I get for not reading the whole thread first. It's the *SRVPGM that uses a file that is a problem.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx

-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
To: rpg400-l@xxxxxxxxxxxx
From: "Mark Murphy/STAR BASE Consulting Inc."
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 03/04/2011 02:36PM
Subject: Re: RPG ILE Problems (Activation Groups)

That isn't quite right.  I just ran a test on v6.1

RPGLE program AGTEST created with CRTBNDRPG
     h DftActGrp(*No) ActGrp(*Caller)

     fmcphmo    if   e             disk

      /free
         read mcphmo;
         dsply 'did it!';
         return;
      /end-free

CLP program AGTESTCL created with CRTCLPGM
             pgm
             call       agtest
             rclrsc
             call       agtest
             endpgm

According to your explanation, the second call to AGTEST should fail because it is trying to read a file that is closed.  I did verify that rclrsc closes the file, but it is back open when AGTESTCL ends.

Still looking for an example of the problems that this causes.  I have a client that used *CALLER from the default activation group almost exclusively, and I could never convince them it is a problem because they have done it that way for years.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx

-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
From: Joep Beckeringh
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 03/03/2011 02:13PM
Subject: Re: RPG ILE Problems  (Activation Groups)

Luis,

In general:
- Real ILE programs are intended to run in 'real' activation groups, not
in the default activation group. OPM compatible programs -
DFTACTGRP(*YES) - are intended to run in the OPM environment; they
behave differently.

Specifically:
- Real ILE programs stay active until the activation group ends. If a
real ILE program runs in the default activation group, the only way to
end it is to end the job.
- OPM compatible programs react to RCLRSC as OPM programs do: they close
their files and on next activation behave as if they were called for the
first time. When an ILE program runs in the default activation group and
a RCLRSC is issued, the files are closed, but on the next call the
program will not reopen them.

Joep Beckeringh


Op 03-03-11 19:02, LuisMaldonado schreef:
Hi,

could someone explain me why  Using *caller with dftactgrp causes big problems.

thank you




Lluis  Maldonado

Dpto. Informática - CIFSA

Area logística

Tel: +34 93 814 09 09 - Extensión: 249

E-mail: lmaldonado@xxxxxxxx



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.