Kbase P40692: What is the difference of using variables defined as UNDO an
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/8/2003 |
|
Status: Unverified
GOAL:
What is the difference of using variables defined as UNDO and NO-UNDO
FIX:
When the value of a variable is changed during a transaction and the transaction is undone, Progress restores the value of the variable to its prior value. If you do not want, or if you do not need, the value of a variable to be undone even when it has been changed during a transaction, use the NO-UNDO option with the DEFINE VARIABLE statement. NO-UNDO variables are efficient; use this option whenever possible.
Specifying NO-UNDO for a variable is useful if you want to indicate an error condition as the value of the variable, perform an UNDO, and later take some action based on that error condition. If one variable is defined LIKE another that is NO-UNDO, the second variable NO-UNDO only if you specify NO-UNDO in the definition of that second variable.