DECLARE CONNECTION HANDLE UNSET (Reset all connection handles being used)

Function

DECLARE CONNECTION HANDLE UNSET resets all declarations of connection handle usage specified in DECLARE CONNECTION HANDLE SET statements prior to this statement.

Format

DECLARE CONNECTION HANDLE UNSET

Common rules

  1. The scope of the connection handles specified in a DECLARE CONNECTION HANDLE UNSET statement depends on the location in the source program where the connection handles appear. Releasing connection handles by issuing DECLARE CONNECTION HANDLE UNSET causes use of all connection handles by all SQL statements to be discontinued until another DECLARE CONNECTION HANDLE SET appears.
  2. DECLARE CONNECTION HANDLE UNSET cannot be used in the COBOL language.

Note

The system does not process a multi-connection function for SQL statements that are issued after a DECLARE CONNECTION HANDLE UNSET has been issued.

Example

Release all connection handles that have been declared:

DECLARE CONNECTION HANDLE UNSET;