This post deals with the how-to of setting up AIS to have one phase commit transactions over VSAM files. For the impatient among you, I've bolded the action-items. Note the following:

1. 2PC transactions can also be setup, but let's deal with that in a separate post.
2. This setup is not specific to ODBC. JDBC and ADO setup is identical as all this has nothing to do with the API of choice.
3. This post assumes that you have a datasource defined in AIS of type VSAMCICS. I'm not going to get into setting up a VSAMCICS datasource - all that is covered in the standard AIS documentation.
4. Note that VSAM files not managed by CICS (AIS datasource type 'ADD-VSAM') cannot be setup for transactions.

From an AIS point of view, there is only one thing that needs to be done to setup 1PC transactions for a VSAMCICS datasource:

Change the transaction type in the datasource configuration to 1PC. In the XML view of the configuration this would be transactionType='1PC'

All the rest of this post really deals with what the CICS/VSAM environment needs to be and what happens "under the hood".

The requirements for transactions to really work for VSAM are:

1. RRS must be running on the system.
2. The file definition in CICS must be specified with Recovery of "Backoutonly". No need to setup journalling or anything like that.
3. The VSAM data set itself must be defined with RECOVERY. You should see the RECOVERY indication in the IDCAMS LISTCAT output if you are not sure.


That's it. What happens is that AIS will use EXCI to communicate with CICS and will specify NOSYNCONRETURN mode on the DPL request. When the transaction is committed, AIS will execute an ATRCMIT call to commit the unit of work.