Applications that need to deal with complex transaction management issues, may benefit from establishing multiple concurrent connections to the same database. Since each connection in DB2 CLI has its own transaction scope, any actions performed on one connection will not affect the transactions of other connections.
For example, all open cursors within a transaction get closed if a problem causes the transaction to be rolled back. An application can use multiple connections to the same database to separate statements with open cursors; since the cursors are in separate transactions, a rollback on one statement does not affect the cursors of the other statements.
Using multiple connections may mean bringing some data across to the client on one connection, and then sending it back to the server on the other connection. For example: