Rollback or commit transactions

Hi,

In natural/db2 is there a statement that i could say the transaction starts here and based on some condition it rollback or commits transactions.

There are 2 transactions say A, B.

CALL A
CALL B
based on one of the flag in ‘B’ i have to either commit or rolback the transactions in A and B together.
I used BACKOUT TRANSACTION but it just rollbacks only the ones done in ‘B’ not in A.

Requirement is either commit both A and B or Rollback both A and B.

Please let me know.
Thanks in advance.

~Jei

Education, Education, Education.

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat424mf/dbms/db2_sql.htm#db2_sql

It “reads” as if you have one logical transaction, not two. If you have a COMMIT after the maintenance commands in A, surprise, they are committed, and you can no longer ROLLBACK those commands.

steve

Thanks Steve.

I dont do any commit in transaction A. I think it auto commits.
Is there a way to avoid it.

My understanding is that in Natural for DB2 a terminal I/O causes a Commit. Check for a terminal I/O in “A”.

it results in a commit transaction