If I understand ACTGRPs correctly:

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

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

<NAMED> Starts a new ACTGRP named <x> (if required) that goes away when
the JOB ends.  (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.)

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

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

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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.