Ending of activation group

The IBM® i Integrated Language Environment® (ILE) program model uses activation groups as a way to encapsulate resources for an application program within a job.

When multiple threads exist in the jobs that possibly use the activation group, the system cannot end that activation group in a predictable and safe way. To solve this problem, the system changes the behavior of ending an activation group in a multithreaded job.

Start of changeIn IBM i 6.1 and earlier releases, if a secondary thread in a multithreaded application performs an action that ends an activation group (for example, C functions exit() or abort()), or fails to prevent an activation group from ending, the system ends the job at that time. Beginning with IBM i 7.1, the job ends only if an activation group is ended in a secondary thread and the activation group is active in more than one thread.End of change

Start of changeIn IBM i 6.1 and earlier releases, if the initial thread in a multithreaded application performs an action that ends an activation group, or fails to prevent an activation group from ending, the system does not end the job. Beginning with IBM i 7.1, if the initial thread in a multithreaded application performs an action that ends an activation group, or fails to prevent an activation group from ending and that activation group is active in more than one thread, the system ends the job.End of change

Start of changeA typical example occurs when a *NEW activation group program is called from a secondary thread. When the program ends, the *NEW activation group is destroyed. In IBM i 6.1 and earlier releases, the job ends.End of change

Start of changeIf an HLL exit verb, like the C Runtime exit() function, is called from a secondary thread in IBM i 6.1 and earlier releases, the job ends. Beginning with IBM i 7.1, the job ends only if the activation group being ended is active in more than one thread.End of change

Start of changeSee Activation groups and threads for more information about this topic.End of change