With COMMIT and ROLLBACK
Go Up to Closing a Database
To close all open databases when you COMMIT or ROLLBACK, use the following syntax:
EXEC SQL
{COMMIT | ROLLBACK} RELEASE;
For example, the following COMMIT closes all open databases:
EXEC SQL COMMIT RELEASE;
To close specific databases, provide their handles as parameters following the RELEASE option with COMMIT or ROLLBACK, using the following syntax:
EXEC SQL COMMIT | ROLLBACK RELEASE handle [, handle ...];
In the following example, the ROLLBACK statement closes two databases:
EXEC SQL ROLLBACK RELEASE DB1, DB2;