CL Command Reference - STRCMTCTL

CL Command List > STRCMTCTL Reference

Description:

The Start Commitment Control (STRCMTCTL) command is used to establish either a job level or activation group level commitment definition. The job¡¯s current name space determines which IASP the commitment definition is created in, and only files in that same ASP can be opened under commitment control for this commitment definition.

This command also specifies the level of record locking that occurs for the commitment definition to be started. Also, a notify object can be specified.

Before a commitment definition is established, the user must ensure that all database files that are to be opened under commitment control for a single commitment transaction are journaled. If only the after images are being journaled, the system implicitly begins journaling both the before and the after images for the duration of the changes being made to files opened under this commitment definition.

A default journal can be specified. Entries that describe all journals and systems involved in a commitment control operation can be placed in this journal.

Restrictions:

1. The user must have object operational and add authority to the object named on the NFYOBJ parameter, if an object is specified.

2. The user must have object operational and add authority to the object named on the DFTJRN parameter, if an object is specified.


Examples:

Example 1: Defining Activation Group Level Commitment Control

STRCMTCTL LCKLVL(*CHG) CMTSCOPE(*ACTGRP) TEXT(¡¯Blue Commit Group¡¯)

This command described by the user as the Blue Commit Group starts the activation group level commitment for the activation group associated with the program issuing the command.

Only records that are updated, inserted, or deleted are locked until the transaction is ended by a commit or rollback operation. No identification for the commitment boundary is sent after the initial program load (IPL) following an abnormal system end, after an abnormal end to an activation group for the job, or when the job or activation group ends either with uncommitted changes or with a nonzero completion code.



Example 2: Defining Job Level Commitment Control

STRCMTCTL LCKLVL(*ALL) NFYOBJ(RCVLIB/MYFILE *FILE IDSAVE)
CMTSCOPE(*JOB) DFTJRN(MGWLIB/MYJRN)

This command starts the job level commitment definition. All records accessed in files opened under commitment control are locked until the commitment transaction is ended by a commit or rollback operation. If a commitment transaction ends in a manner that a notify object is to be updated with the commitment identifier of the last successful commit operation, the notify object to be updated is member IDSAVE of file MYFILE in the library RCVLIB. When a commit or rollback is done, an entry that lists information about all the resources involved in the logical unit of work is put into journal MYJRN in library MGWLIB.