ILE COBOL Programmer's Guide

Commitment Control Scoping

Multiple commitment definitions can be started and used by program objects running within a job. Each commitment definition for a job identifies a separate transaction that has resources associated with it. These resources can be committed or rolled back independently of all other commitment definitions started for the job.

The scope for a commitment definition indicates which programs, that run within the job, use that commitment definition. Commitment definitions can be scoped in two ways:

You specify the scope for a commitment definition on the CMTSCOPE parameter of the STRCMTCTL command.

The default scope for a commitment definition is to the activation group of the program issuing the STRCMTCTL command. Only program objects that run within that activation group will use that commitment definition. The commitment definition started at the activation group level for the OPM default activation group is known as the default activation group (*DFTACTGRP) commitment definition. Each activation group may have its own commitment definition.

A commitment definition can also be scoped to the job. Any program object running in an activation group that does not have a commitment definition started at the activation group level uses the job level commitment definition. This occurs if the job level commitment definition has already been started by another program object for the job. Only a single job level commitment definition can be started for a job.

For a given activation group, only a single commitment definition can be used by the program objects that run within that activation group. Program objects that run within an activation group can use the commitment definition at either the job level or the activation group level. However, they cannot use both commitment definitions at the same time.

When an ILE COBOL program performs a commitment control operation, it does not directly indicate which commitment definition to use for the request. Instead, the system determines which commitment definition to use based on which activation group the requesting program object is running in.

Files associated with a commitment definition scoped to an ILE activation group will be closed and implicitly committed when the activation group ends normally. When an activation group ends abnormally, files associated with a commitment definition scoped to the activation group will be rolled back and closed.

Refer to the ILE Concepts book for further information about commitment control scoping.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]