Nested transaction in Natural/Adabas and two phase commit

Hi,

I’m writing an application in WebSphere and need to integrate it with business logic on a legacy mainframe with Natural/Adabas. The business logic also performs writes to the Adabas database.

The Natural code contains many internal commits (ETs) in various routines during the business logic process (There are hundreads of such ETs along the process sub programs).

My questions are:

  1. Is there a way to wrap all these internal Natural transactions with an external transaction such that if I BT the external transaction - all inner transactions will be rolled back - i.e. are nested transactions (as defined for example in Oracle) supported? if so - how to do it?

  2. In this scenario (many ETs in Natural code) - and assuming nested transactions are not supported - is there still a way to do two phase commit such that if commit on the WebSphere failes (after calling the MF and returning succesfully) would rollback the MF Adabas writes?

  3. Are there any external frameworks / products that relate to this problem you can recommend?

Thanks,
Michael

There is nothing in Adabas that would help you. ET statements in Natural cause before/after buffer flushes in Adabas; hence the rollback logic will terminate at the last ET.

steve

The only process I’m aware of to do what you are asking is a “compensating transaction” - an application transaction that undoes whatever the previous transaction did. In some applications, this is as simple as reversing the sign and redoing the transaction; others are more complex.

Omitting the ETs for all “inner” transactions will ascertain that no other user can modify your data while your “outer” transaction still ongoing. On the other hand, this might require that the Adabas hold queue size is enlarged.

With Natural’s profile parameter ETSYNC set to ON, you can instruct Natural to use Resource Recovery Services (RRS) which seem to be supported by WebSphere, too. The Adabas Transaction Manager (ATM) is a product that may be useful in that context.