You can use COMMIT, ROLLBACK TO SAVEPOINT and ROLLBACK ... These statements are NOT permitted within ATOMIC blocks ...
On mainframes, you have a COMMIT ON RETURN statement
On LUW, you can use an UNDO handler(provided the compound stmt is declared as ATOMIC) to rollback changes that were done within the compound statement
HTH
Sathyaram