Sequence of journal entries under commitment control

This table shows the sequence of entries that are typically written while a commitment definition is active. You can use the Journal entry information finder to get more information about the contents of the journal entries.

Commitment control entries are written to a local journal if at least one of the following conditions is true:

Entry type Description Where it is written When it is written
C BC Begin commitment control To the default journal, if one is specified on the STRCMTCTL command. When the STRCMTCTL command is used.
To the journal. When the first file journaled to a journal is opened or when an API resource is registered for a journal.
C SC Start commit cycle To the journal. When the first record change occurs for the transaction for a file journaled to this journal1.
To the journal for an API resource. When the QJOSJRNE API is first used with the Include Commit Cycle Identifier key.
Journal codes D and F DDL object-level entries To the journal associated with the object being updated. Only journal entries that contain a commit cycle identifier represent a DDL object-level change that is part of the transaction. When updates occur.
Journal code R Record-level entries To the journal associated with the file being updated. When the updates occur.
Journal code U User-created entries To the journal associated with an API resource. If the application program uses the QJOSJRNE API is first used with the Include Commit Cycle Identifier key.
C CM Commit To the journal. When the commit has completed successfully.
To the default journal. If any committable resources are associated with the journal.
C RB Rollback To the journal. After the rollback operation has completed.
To the default journal. If any committable resources are associated with the journal.
C LW End transaction To the default journal, if one is specified on the STRCMTCTL command. The system writes an LW header record and one or more detail records. These entries are written only if OMTJRNE(*NONE) is specified on the STRCMTCTL command or if a system error occurs. When the commit or rollback operation has completed.
C EC End commitment control To the journal. When the End Commitment Control (ENDCMTCTL) command is completed.
To a local journal that is not the default journal. When a commit boundary is established, following the point when all committable resources associated with that journal have been removed from commitment control.
C SB Start of savepoint or nested commit cycle. To the journal. When the application creates an SQL SAVEPOINT, or when the system creates an internal nested commit cycle to handle a series of database functions as a single operation2.
C SQ Release of savepoint or commit of nested commit cycle. To the journal. When the application releases an SQL SAVEPOINT, or when the system commits an internal nested commit cycle2.
C SU Rollback of savepoint or nested commit cycle. To the journal. When the application rolls back an SQL SAVEPOINT, or when the system rolls back an internal nested commit cycle2.
Notes:

1 You can specify that the fixed-length portion of the journal entry includes transaction information by specifying the Logical Unit of Work (*LUW) value for the Fixed-Length Data (FIXLENDTA) parameter of the Create Journal (CRTJRN) or Change Journal (CHGJRN) command. By specifying the FIXLENDTA (*LUW) parameter, the fixed-length portion of each C SC journal entry will contain the Logical Unit of Work ID (LUWID) of the current transaction. Likewise for XA transactions, if you specify the FIXLENDTA(*XID) parameter, the fixed-length portion of each C SC journal entry will contain the XID of the current transaction. The LUWID or XID can help you find all the commit cycles for a particular transaction if multiple journals or systems are involved in the transaction.

2 These entries are sent only if you set the QTN_JRNSAVPT_MYLIB_MYJRN environment variable to *YES where MYJRN is the journal you are using and MYLIB is the library the journal is stored in. Special value *ALL is supported for the MYLIB and MYJRN values. You can set these variables system-wide or for a specific job. To have the entries sent for journal MYLIB/MYJRN for just one job, use this command in that job:

  • ADDENVVAR ENVVAR(QTN_JRNSAVPT_MYLIB_MYJRN) VALUE(*YES)

To have entries sent for all journals for all jobs, use this command:

  • ADDENVVAR ENVVAR('QTN_JRNSAVPT_*ALL_*ALL') VALUE(*YES) LEVEL(*SYS)

You need to set the environment variable before you start commitment control.

Related concepts
Commit operation
Journal entry information finder
Related reference
End Commitment Control (ENDCMTCTL) command