I have the following question, how can i do nested transaction in natural using DB2, ie, consider the following pseudocode.
START TRANSACTION A
—GET A COUNTER----
SELECT W FROM Y WHERE I = L SET W = W + 1 UPDATE Y
-----END GET A COUNTER—
MORE UPDATES, ETC
END TRANSACTION A
the "GET A COUNTER " SUB-PROGRAM should be able to do a nested transaction, because i have many programs calling this SUB-PROGRAM
and we’re getting a lot of locks (error -911 resource not available) from DB2. we changed the lock mode on the tablespace to “row-lock”.
any hints or workarounds ?