RELEASE SAVEPOINT
From SQL PL Guide for DB2
RELEASE SAVEPOINT statement
If you don't need any longer a specific savepoint it's possible to release the savepoint with the RELEASE SAVEPOINT statement.
Syntax:
RELEASE [TO] SAVEPOINT <savepointname>
Example:
create procedure savepoints
begin
insert into test values ('1st Insert');
savepoint mysavepoint on rollback retain cursors;
insert into test values ('2nd Insert');
release savepoint mysavepoint;
rollback to savepoint mysavepoint;
end!
Test of this example:
call savepoints;
Result:
You will get an runtime error (SQL0880N) because the savepoint mysavepoint is not available in during the rollback statement is executed.