IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem commiting to DB2 from IMS MPP


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ole Soerensen

New User


Joined: 17 Jul 2017
Posts: 2
Location: Sweden

PostPosted: Wed Jul 26, 2017 5:19 pm
Reply with quote

Hi forum,

I am looking for a way to issue an explicit DB2 commit in an IMS online program to make sure that everything is commited before the transaction ends. I have been searching the forum and WWW generally but so far I have not come up with any definitive answer.

Background: I have a Java client that calls a service and initiates an IMS transaction which calls a COBOL program to delete a record on a DB2 table. Straight after deleting the record the Java client calls another service to pull up a list of records from the same DB2 (less the deleted one of course). However, it seems that by the time the second transaction selects records from the DB2 table, the record deletion in the first transaction has not yet been committed to the database and so this record is fetched along with any other records.

I did find a 10 year old thread on this forum that deals with the exact same issue but back then it seems that it was not possible to do an explicit commit in an IMS online program.

Anyone who has found a way to do this, or will I need to add a delay in the Java client between the first and second transaction to ensure that the first IMS transaction has ended and changes committed to the database?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 696
Location: Whitby, ON, Canada

PostPosted: Wed Jul 26, 2017 11:29 pm
Reply with quote

An IMS online program (MPP) performs an implicit commit when it issues a GU to the IOPCB.

Does the Java program wait for a response from the IMS transaction before issuing the second transaction?.
Back to top
View user's profile Send private message
Ole Soerensen

New User


Joined: 17 Jul 2017
Posts: 2
Location: Sweden

PostPosted: Thu Jul 27, 2017 12:47 am
Reply with quote

don.leahy wrote:
An IMS online program (MPP) performs an implicit commit when it issues a GU to the IOPCB.

Does the Java program wait for a response from the IMS transaction before issuing the second transaction?.


It does wait for a response. However, it it is very quick to fire off the second transaction.

Is there a delay between the IMS sending back a response and changes in DB2 being committed? From reading about it I understand it to be a 2-step process where IMS completes the transaction and then instructs DB2 to commit all changes (but I could be wrong).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Sysncsort - Justification problem SYNCSORT 6
No new posts Problem getting record length of a re... COBOL Programming 2
No new posts Problem while trying to manipulate re... DFSORT/ICETOOL 3
No new posts TSO IOF problem TSO/ISPF 5
No new posts Need help with this dfsort problem DFSORT/ICETOOL 7
Search our Forums:

Back to Top