0

I am trying to get XA transactions work using unixODBC driver for DB2 database and WMQ Manager using C++. Default Auto Commit has been turned off

Following are the configurations:
UnixODBC => odbc.ini

Driver = DB2_DRIVER
Database = DBNAME
uid = username
pwd = password

WMQ => qm.ini

XAResourceManager: 
        Name=xa_name 
        SwitchFile=db2swit 
        XAOpenString=DBNAME,username,password,toc=p,hold_cursor=t 
        ThreadOfControl=PROCESS

Following are the steps that I follow in my program

1. Start transaction using MQBEGIN 
2. Database connectivity 
3. MQGET 
4. Insert in DB 
5. Disconnect DB 
6. End transaction with MQCMIT

After doing the mentioned steps message gets removed from MQ queue but not committed in database. Can anyone please tell me if I am missing some configuration here.

Versions of softwares used    
unixODBC => 2.3.2   
Websphere MQ => 7.1.0.0   
DB2 client => 9.7 fix pack 4 

Thanks in advance

Hudson Diniz
  • 43
  • 1
  • 2
  • 4
  • Have you tested with the IBM sample programs? Did they work or did they exhibit the same behavior? – T.Rob Apr 10 '14 at 13:42
  • IBM sample programs if I am not mistaken use embedded sql. We are facing issues with unixODBC and not embedded sql – Hudson Diniz Apr 10 '14 at 15:18

0 Answers0