>>---EXEC SQL---ROLLBACK----.--------------.------------->
                            +-WORK---------+
                            +-TRAN---------+  
                            +-TRANSACTION--+
 >---.-----------.---END-EXEC---><  
     +--RELEASE--+
     +--TO-.-----------.-name--+
           +-SAVEPOINT-+ 
               	 EXEC SQL
   ROLLBACK
END-EXEC
EXEC SQL
    ROLLBACK WORK RELEASE
END-EXEC
END-EXEC
EXEC SQL
    ROLLBACK TO SP1
END-EXEC 
               	 
Comments:
When RELEASE is specified and the transaction is successfully rolled back, the current connection is closed.
TO [SAVEPOINT] rolls the transaction back just to the save point specified by name, which must be set by a preceding SAVEPOINT statement.