PDCNCTHDL type variable declaration

Function

The PDCNCTHDL-type variable declaration declares the connection handle-type variable to be used in an environment where a multi-connection function is used.

Format 1: C language

PDCNCTHDL connection-handle-variable-name

Operand

Specifies the connection handle that is to be used.

Common rules

The PDCNCTHDL-type variable declaration is used when an SQL statement is executed in an environment where a multi-connection function is used.

Notes

  1. PDCNCTHDL-type variables are declared in the embedded SQL declaration section.
  2. A PDCNCTHDL-type variable cannot be declared as an array.

Example

Declare a PDCNCTHDL-type variable named CnctHdl:

EXEC SQL BEGIN DECLARE SECTION;
   PDCNCTHDL    CnctHdl;
EXEC SQL END DECLARE SECTION;

Format 2: COBOL language

EXEC SQL BEGIN DECLARE SECTION END-EXEC
01 connection-handle-variable-name SQL TYPE IS PDCNCTHDL.
EXEC SQL END DECLARE SECTION END-EXEC

Operands

Specifies the name of the connection handle to be used.

Common rule

  1. Declare PDCNCTHDL-type variables when executing the SQL statement in an environment using the multi-connection facility.

Notes

  1. PDCNCTHDL-type variables are declared in the embedded SQL declaration section.
  2. PDCNCTHDL-type variables cannot use the OCCURS clause.

Example

Declare a PDCNCTHDL-type variable named CONNECTHDL.

EXEC SQL BEGIN DECLARE SECTION END-EXEC
 01 CONNECTHDL SQL TYPE IS PDCNCTHDL.
EXEC SQL END DECLARE SECTION END-EXEC