On 2/6/2013 12:21 PM, Charles Wilt wrote:
On Tue, Feb 5, 2013 at 4:57 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
And my advice for service programs is the same asI agree with everything except the above...
for programs. Use ACTGRP('MYCOMPANY').
IBM recommends ACTGRP(*CALLER) for service programs...
With all the programs as ACTGRP(MYCOMPANY), the service programs will end
up there also. At least till you gain the experience and knowledge to
start using other activation groups.
At that point, 99.9% of the time, you'll still want ACTGRP(*CALLER) for
your service programs. The other 0.1% you'd want the SRVPGM to be in it's
own unique activation group.
If you start out with ACTGRP(MYCOMPANY) for your service program, it will
be all too easy to end up with a program not using ACTGRP(MYCOMPANY) making
calls into it which is a recipe for trouble.
The day that someone at MYCOMPANY decides they need STATIC storage
scoped not just to the job level, but to the activation group level is
the day they re-create that service program as ACTGRP(*CALLER). They'll
be doing work on it anyway in order to implement the new functionality
When I want to do this I'll no longer be a beginner, and I'll be able to
understand the ramifications of my decisions.
As far as 'a recipe for trouble' I'm not following. I'm trying to think
where I've used multiple activation groups.
1) STATIC variables in a utility, separated by application
2) OVRDBF SHARE(*YES) where I want to keep the file pointers separate by
3) Want to free memory by brute force RCLACTGRP.
Both 1 and 2 require design up front, so it's not as though a beginner
is going to accidentally walk into these. Number 3 on the other hand I
might accidentally do, thinking I'm being efficient. Destroying a named
AG (one that doesn't have overrides or static storage scoped to it) is a
potential performance issue, but it seems pretty hard to accidentally
get there; I'd have to be out of the AG (at the menu?) in order to
destroy it, and that transition (menu to application to menu again)
isn't likely to be done a thousand times an hour. So the machine
resources consumed in creating and destroying the AG don't seem
I am almost certainly missing something; my experience is heavily
influenced by the projects I've had. Others' experiences are certainly
different. It will be interesting to hear from other people!