Problem solve Get help with specific problems with your technologies, process and projects.

Rolling back DB2 tables

I have a an online COBOL-CICS-DB2 program where I receive data through commarea from a front end Java application. This program is accessed from CICS Transaction Server using the program name -- no trans id -- by a Java application in WSAD.

The data would be inserted or updated in 10 different DB2 tables using CURSORs. For example if the insert/update using a cursor in the ninth DB2 table has failed.

How do I rollback all the previous tables which have been successfully inserted/updated? In other words, if the program has encountered any sort of error, I want to undo the whole transaction.
Unless I am missing something here in terms of your application design, as long as you do not COMMIT the ROLLBACK issued through the CICS program, it would roll back all of the updates to the beginning of the transaction -- or the last COMMIT/SYNCPOINT).

Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.

Dig Deeper on IBM DB2 management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.