iSeries and activation groups

I have a program that is running in the default activation group. Within the various modules I use a procedure from a system service program that runs in a named activation group. At some point the application performs a RCLACTGRP *ELIGIBLE which deletes the named activation group for the service program. The calling program remains active but when I execute the procedure from the system service program I get "Tried to refer to all or part of an object that no longer exists." message. I'm thinking that I either need to ensure the particular named activation group is not trashed by the RCLACTGRP or I need some way of "resetting" the procedure pointer?? in the calling program. Any help much appreciated. Thanks

Answer Wiki

Thanks. We'll let you know when a new response is added.

Couple of points:
1. Service programs (i.e. *SRVPGM) should generally be compiled with the activation group set to *CALLER. That should solve your problem.
2. RCLACTGRP *ELIGIBLE within programs is usually not a good idea (in my experience). Consider reclaiming activation groups by name.

One more point:
If your calling program is an ILE program, consider specifying a named activation group rather than the default. Even QILE would be better. Reclaim the activation group when you know it will no longer be needed.

Hope this helps.

Discuss This Question: 2  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheQuigs
    Yes, you it is never a good idea to run a true ILE program in the Default Activation group. You can close files, etc. for the program, but the storage allocated for the program when it was 'Activated' is not cleaned up until the job ends. This can also cause unpredictable results.
    0 pointsBadges:
  • JonP
    _Never_ use *Eligible in production code. It is so dangerous that IBM have even "hidden" it as an option on the command. Prompt for RCLACTGRP and try and even find *ELIGIBLE as an option! I think the only place it is mentioned is in the help text. Not only will it cause the kind of problem that you have experienced, but it may cause other system functions to fail. It is OK to use it as a convenience when testing, but never safe to do so in production code. It is also not a good idea to run real ILE programs/service programs in the DAG, although many people get away with it. AT least until they satrt usning files in service programs and ....... See our article "The seven deadly sins of ILE" if you want to know more. Go to www.eservercomputing/iseries and search for seven deadly sins. I would give you the URL but they are a bit screwed up at the moment. Jon Paris
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: