The API tab describes the settings used by the Add Commitment Resource (QTNADDCR) API.
The columns are:
Resource name: The name that identifies this commitment resource. It is used, for example, in some error messages associated with the commitment control exit programs.
Allow remote resources: Indicates whether this API resource is compatible with remote resources.
Exit program: The name of the commitment control exit program to be called from the commitment control operations.
Exit program schema: The schema in which the exit program is located
Journal: The name of the journal associated with this resource. The first 10 characters of this name contain the journal name, and the second 10 characters contain the schema name.
Journal schema: The name of the schema that contains the journal
When an exit program is called:
Call to classify: Indicates whether the commitment control exit program should be called during the classify phase of a commit or rollback. The commitment control exit program is called during the classify phase to use protected conversations and force any buffered data. Possible values are Yes or No.
Call to prepare: Indicates whether the commitment control exit program should be called during the prepare phase of a commit. The commitment control exit program is called during the prepare phase of the commit to put its resources in a position to either commit, rollback, or recover from a system failure. The commitment control exit program is also given a chance to vote whether this logical unit of work should commit, rollback, or that the resources associated with this commitment control exit program have not been changed. If the resources have not been changed then the exit program can choose not to be called during the second phase of the commit. This is commonly referred to as voting read-only. Possible values are Yes or No.
Call to commit: Indicates whether the commitment control exit program is called to commit the API's resources during a commit operation. Yes is the only value as commitment control exit programs are always called to commit their resources.
Call to rollback: Indicates whether the commitment control exit program is called to rollback the API's resources during a rollback operation. Yes is the only value as commitment control exit programs are always called to rollback their resources.
Acts as Last agent: Indicates whether this commitment resource should be called as the last agent. The last agent is called after all resources have been prepared and before any resources have been committed. This resource will make the decision about whether this logical unit of work commits or rolls back. Specifying an API commitment resource to be called as the last agent could cause incompatibilities between applications. It will also cause the logical unit of work to be rolled back if a last agent cannot be selected. A single call will be made to the commitment control exit program if it is the last agent. This exit program must commit or roll back its resources and then inform commitment control of what it did through the Commit Vote return field. If the call to the exit program fails (an exception is returned) or if the system fails during the call to the exit program, the logical unit of work will be committed or rolled back according to the Action if problems commitment option. The Action if problems commitment option can be changed with the Change Commitment Options (QTNCHGCO) API. Possible values are Yes or No.
Call during IPL: Indicates whether the commitment control exit program will be called during any commitment control processing that occurs during IPL recovery processing for the commitment definition. Possible values are Yes or No.
Call to reacquire locks: Indicates whether the commitment control exit program is called to reacquire locks during IPL recovery or ASP vary on if the logical unit of work will not commit or rollback until after the IPL or ASP vary on has finished. The purpose of this call is to commit or rollback resources whose status was found to be in doubt during the IPL or ASP vary on. Possible values are Yes or No.
Call for rollback required: Indicates whether the commitment control exit program should be called if the commitment definition to which this resource was added is put in a rollback-required state. When a commitment definition is placed in a rollback-required state, the use of protected resources is not allowed until the commitment definition is rolled back. The commitment control exit program should take the necessary action so that the API resources registered cannot be used until a rollback is done. Possible values are Yes or No.
Allows saves: Indicates whether the registration of this API commitment resource allows save processing to perform normally. If multiple API commitment resources are to be registered, they all must specify Yes in order to prevent poor performance of save-while-active processing. Possible values are Yes or No. If Yes is specified, the resource allows all save requests to perform normally. If No:
- All save operations that are attempted from the job in which the resource is registered are rejected. The resource must be removed before a save can be performed in the job.
- Save operations that are attempted from other jobs, and that specify save-while-active, wait for this resource to be at a commitment boundary. A commit or rollback must be performed for the job in which the resource is registered before the save-while-active will be allowed in the other job.
- Save operations that are attempted from other jobs, and that do not specify save-while-active, perform normally. They do not wait for this resource to be at a commit boundary.
Call during ASP Vary On: Indicates whether the commitment control exit program will be called during any commitment control processing that occurs during ASP device vary on recovery processing for the commitment definition. Possible values are Yes or No.
Call for rollback to savepoint: Indicates whether the commitment control exit program should be called when rollback to savepoint is requested for the commitment definition to which this resource was added. Valid values are Yes and No.
Call for release savepoint: Indicates whether the commitment control exit program should be called when release savepoint is requested for the commitment definition to which this resource was added. Valid values are Yes or No.
Call for set savepoint: Indicates whether the commitment control exit program should be called when a savepoint is established for the commitment definition to which this resource was added. Valid values are Yes and No.
For more information, see Add Commitment Resource (QTNADDCR) API and Commitment Control Exit Program in the i5/OS Information Center.