When disconnecting from an SQL data source through AcuSQL, use the following syntax for the SQL DISCONNECT statement.

DISCONNECT { CURRENT | ALL | connection-name }

connection-name is an alphanumeric literal or host variable defined in an ESQL DECLARE section of Working-Storage. Note that you must place a colon (“:”) before the host variable in the statement.

DISCONNECT closes the current connection, connection-name, or all connections. DISCONNECT CURRENT and CONNECT RESET cause the current connection to be closed. When the current connection is closed the value of current connection remains empty. You must use SET CONNECTION to set a new current connection.