Activation Groups

Application development
I am changing some CL programs and COBOL/400 programs to ILE and ran into problems with OPNQRYF. I think it is due to the fact that the default activation groups when compiling these 2 different types of programs are different, so the results of OPNQRYF are not available to COBOL program. Can I compile all programs to use same activation group for all jobs & have it run the same in ILE as it does in OPM?

Answer Wiki

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

there is no link to type of program, a source prog when compiled produce a *MODULE (command CRTCLMOD, CRTxxxMOD).

but there is link with activation group, a parameter that belong to program creation (CRTPGM).
If you are not familiar with activation group and have no help on it, bypass the error by specifying always *dftactgrp.

an activation group is laike a sub-job, it has it’s own file descriptors.
That means you can open simultaneously (for a job) the same file one time in input, one time in output but within different actgrp.
Usefull when opening files that belong to a supplier package : interferences are minimized.

There is a explaination on Activation group in the red book ile concepts, I have forgot the file name.


If you’re compiling as ILE, then neither your CL nor your COBOL programs should be created to run in *DFTACTGRP. Instead, create them to run in the *CALLER activation group. In that way, the programs will have the full ILE structure; but the “caller” will almost always be an OPM program unless you change to have an ILE program issue the call. You’ll run in the default activation group until you choose not to.

In addition, your CL and COBOL will run in the ‘same’ activation group together, even if you later start them from somewhere else.

If the problem is related to your use of OPNQRYF, it’s probably because your overrides aren’t scoped to cover both programs. By running both programs in the same activation group, it won’t matter if the overrides are scoped to the job or only to the activation group.


Discuss This Question: 3  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.
  • Pcatlin
    JPLamontre's answer is correct, however if you end up with any sub-procedures in your COBOL program you may not be able to create the program with the default activiation group. In that case, you can specify the named group QILE. This will produce similar results. By all means read the redbook on this topic, it has a lot of implications.
    200 pointsBadges:
  • Kjjlori
    Thanks for the info. I have reviewed portions of the ILE Concepts & ILE COBOL Programmer guides. What are the disadvantages of running in the default These programs are being migrated to ILE mainly because IBM recommends it.
    0 pointsBadges:
  • JPLamontre
    if you run only default activation group, you can not reclaim it. ie if an error let a file open, you have to logoff-logon. don't confuse RPG4 & ILE, even if they comes at the same time. rpg4 is a (big) upgrade of the compiler, ile is an other method to administer your jobs.
    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: