Restrictions for commitment control with save-while-active

Restrictions for commitment control with save-while-active consist of object-level resource restrictions and application programming interface (API) resource restrictions.

Related information
Commitment Control

Object-level resource restrictions

You cannot make object-level resource changes for objects under commitment control that are in the object-level resource library while the server performs checkpoint processing for those objects. You cannot make object-level resource changes if either of the following are true:
  • The commitment definition is at a commitment boundary.
  • Only record-level changes have been made in the uncommitted transaction.

For this situation, the change does not occur until the save-while-active request completes checkpoint processing for the library. After a delay of approximately 60 seconds, you receive inquiry message CPA8351. The inquiry message allows you to continue to wait for the checkpoint processing to complete or to cancel the request for the object-level resource. If the job is a batch job, the QSYSOPR message queue receives inquiry message CPA8351.

Application programming interface (API) resource restrictions

You can register an API resource within a commitment control transaction with the QTNADDCR API. If you set the Allow save while active field to Y when you use this API, the considerations in this topic do not apply.

You cannot place resources under commitment control if the server is performing checkpoint processing for any save-while-active request and either of the following are true:
  • With the Add Commitment Resource API (QTNADDCR program), the commitment definition is at a commitment boundary.
  • Only record-level changes have been made in the uncommitted transaction.

For this situation, the add is delayed until checkpoint processing is complete for the save-while-active request. After a delay of approximately 60 seconds, you receive inquiry message CPA8351. The inquiry message allows you to continue to wait for the checkpoint processing to complete or to cancel the request for the API resource. If the job is a batch job, the QSYSOPR message queue receives the inquiry message CPA8351.

If a commitment definition has an API commitment resource associated with it, and checkpoint processing is being performed for any save-while-active request, then the job performing a commit or rollback operation for the commitment definition is delayed immediately after the commit or rollback has been performed. The server delays the job until the completion of checkpoint processing for the save-while-active request. After the checkpoint processing is complete, control is returned back to the job issuing the commit or rollback. This delay is necessary because a commitment definition with an API commitment resource is only considered to be at a commitment boundary immediately after a commit or rollback operation but before control is returned to the user program. Once the commit or rollback operation returns control back to the user program, the commitment definition is no longer considered to be at a commitment boundary.