Hi, what you are trying to achieve is the task of a transaction manager. Keep multiple resources (MQ, DB2) in sync. What would you do to do the same thing from a COBOL application? TSO batch does not provide this functionality either. RRS provides this functionality, but there is no API for it that you could use from pure Java.
As an example, instead of using JZOS you could run the Java application in IMS Java Regions, CICS, DB2 Java Stored Procedure or WebSphere z/OS. What can also be considered is using a Java based persistence framework, e.g. Spring to keep the resources in sync. In the end you could also write your own transaction manager. Hope that helps, Denis. -----Original Message----- From: Mohammad Khan <mkkha...@hotmail.com> To: IBM-MAIN <IBM-MAIN@LISTSERV.UA.EDU> Sent: Wed, Apr 2, 2014 4:11 pm Subject: Using DB2 and MQ under JZOS I have a batch program that runs under JZOS ( on z/OS 1.13 ) which connects to DB2 using jdbc type 2 connection and connects to a local MQ queue in binding mode. It updates DB2 data as well as writes to MQ. It seemed to work ok until it encountered an error writing to MQ and abended. More important was the fact that DB2 updates still got committed. Apparently the updates to the two resources are being managed in isolation rather than being coordinated in a global transaction. I guess I haven't figured out how to properly code for this scenario. I haven't found any guidance or sample code in MQ, DB2 or JZOS documents or have failed locate it. Any help, sample code or links to relevant documents will be highly appreciated. Regards Mohammad ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN