Was this helpful?
SAVEPOINT Example
This example shows a typical use of the savepoint statement. During each loop of the program, a savepoint is declared, enabling the program to back out updates in the event of an error:
## begin transaction
  saveindex = 0
  loop until finished processing
 saveindex = saveindex + 1
## savepoint saveindex
  process data
  if error condition then
##  abort to saveindex
    saveindex = saveindex - 1
  end if
 end loop
## end transaction
Last modified date: 08/14/2024