View previous topic :: View next topic
|
Author |
Message |
Ole Soerensen
New User
Joined: 17 Jul 2017 Posts: 2 Location: Sweden
|
|
|
|
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 |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
|
Ole Soerensen
New User
Joined: 17 Jul 2017 Posts: 2 Location: Sweden
|
|
|
|
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 |
|
|
|