Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
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.
More information on the use of journal management is in the "Journal management" article in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. More information on commitment control is in the "Commitment control" article in the Information Center.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
LCKLVL | Lock level | *CHG, *CS, *ALL | Required, Positional 1 |
NFYOBJ | Notify object | Single values: *NONE Other values: Element list |
Optional, Positional 2 |
Element 1: Object | Qualified object name | ||
Qualifier 1: Object | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
Element 2: Object type |
Single values: *MSGQ, *DTAARA Other values: Element list |
||
Element 1: (*MSGQ *DTAARA or *FILE) | *FILE | ||
Element 2: Member, if *FILE | Name, *FIRST | ||
CMTSCOPE | Commitment definition scope | *ACTGRP, *JOB | Optional |
TEXT | Text 'description' | Character value, *DFTTEXT | Optional |
DFTJRN | Journal | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Journal | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OMTJRNE | Journal entries to be omitted | *NONE, *LUWID | Optional |
Top |
Specifies the default level of record locking that occurs for the commitment definition to be started.
This is a required parameter.
Top |
Specifies the name and type of the object where notification is sent regarding the status of a transaction for a commitment definition. The commitment identifier of the last successful commit operation is sent to the notify object only for the following conditions:
For a system failure, the commitment identifier is placed in the notify object after the next successful initial program load (IPL). For a job that ends with uncommitted changes or with a nonzero completion code, the commitment identifier is placed in the notify object during end job processing. For an activation group that ends with uncommitted changes or ends abnormally, the notification text is placed in the notify object during activation group end processing.
A commitment identifier (specified for the Commit identification (CMTID) parameter on the Commit (COMMIT) command) can be specified on each commit operation performed for a commitment definition. If more than one job is concurrently using commitment control or there is more than one commitment definition being used concurrently within a single job, then each commitment definition for each job should use a unique notify object or the specified commit identifier should contain unique text such that the text identifies a single commitment definition for a single job. If *NONE is specified for the CMTID parameter of the Commit (COMMIT) command, this entry is ignored.
The possible library values are:
The possible object type values are:
The possible physical file member values are:
Top |
Specifies the scope for the commitment definition to be started.
Top |
Specifies text that briefly describes the commitment definition to be started. More information on this parameter is in the CL Reference book, Appendix A.
Top |
Specifies the default journal. The default journal contains entries identifying each of the resources involved in a unit of work. Entries can also be placed when each unit of work starts or ends due to a commit or rollback operation, depending on the OMTJRNE parameter value.
See the Backup and Recovery book, SC41-5304 for information on how the system performs the rollback operation under commitment control.
The default journal can be used when adding a resource through the Add Committable Resource (QTNADDCR) Application Program Interface (API). If the special value *DFTJRN is specified for the journal name when calling the API, the name specified on this DFTJRN parameter is used.
The name of the default journal can be qualified by one of the following values:
Top |
Specifies the journal entries to omit from the default journal. If *NONE is specified on the DFTJRN parameter, this parameter is ignored.
Top |
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.
Top |
*ESCAPE Messages
Top |