Transaction Question

nate100

Member
I am defining a transaction by saying;

DO TRANSACTION:

code...
if I get an error, then I want to do a rollback.

END.

What I want to do is that within this transaction, I check some files. If the file has a certain value, I want to rollback. How do I rollback out of the transaction?
 

jongpau

Member
I am defining a transaction by saying;

DO TRANSACTION:

code...
if I get an error, then I want to do a rollback.

END.

What I want to do is that within this transaction, I check some files. If the file has a certain value, I want to rollback. How do I rollback out of the transaction?
You would use "undo, retry" or "undo, leave" depending on what is appropriate for your situation.

So: IF <ROLLBACK-CONDITION-AS-SET-BY-YOU> THEN UNDO, LEAVE.
 

tamhas

ProgressTalk.com Sponsor
And, if you feel like being friendly to the programmers that follow you, name the block and reference it in the UNDO, LEAVE.
 
Top