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



Chris Wolcott wrote:

If I understand ACTGRPs correctly:

*CALLER runs in whatever AG the calling routine is in.  (Even if it is
an OPM program.)

Yup.


*NEW      Starts a new ACTGRP that goes away when the object does.
(Correct?)

Sort of. The activation group ends when the program that started it ends (that's probably what you meant).


<NAMED> Starts a new ACTGRP named <x> (if required) that goes away when
the JOB ends.

Or when you use RCLACTGRP(x) or RCLACTGRP(*ELIGIBLE) and the activation group is not active anymore.


(Your session, if interactive.)  This can be a source of
confusion, when you KNOW you've made the change yet the code still errs
like it used to. . .

===

To reclaim ane ACTGRP, use RCLACTGRP <name>/*ELIGIBLE.  *ELIGIBLE will
reclaim all ACTGRPs that are no longer used.

===

You can only use *CALLER if the called routine is a standalone bound
program, NO *SRVPGM calls.  (I guess because of the possible link to an
OPM environment.)

I'm not sure what you are trying to say here. Any ILE program or service program can be ACTGRP(*CALLER). Any ILE program can be called from an OPM program.


*NEW is similair to the OPM environment, except that it is ILE.  (Doh!)
I.E. persistence of objects, initializations, etc.

Hm. Windows is just like Apple, except that it is Microsoft. What do you mean by this? In ILE many things work different from OPM; doesn't matter whether the activation group is named or *NEW.


If the program is used once, it is a wash over *NEW or <named>.  The
more times it is called in a job, the more you should lean towards
<named>.  

If you only have one program, that is right. But if you have more programs, they can use the same named activation group, that will have to be initialised only once in a job. With *NEW a new activation group will be created for every program.


Depending on how the SRVPGM is created and how the routine termintates,
you may or may not get an initialized storage area with each call.

Which storage are you referring to? Global storage, automatic storage, static storage? Global and static storage will keep their values between calls; automatic storage (non-static local variables) will be initialised on each call.


Joep Beckeringh

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.