GET DESCRIPTOR statement [ESQL]

Description

Retrieves information about variables within a descriptor area, or retrieves actual data from a variable in a descriptor area.

Syntax

GET DESCRIPTOR descriptor-name
... { hostvar = COUNT } | VALUE n assignment [,…] }

Parameters

assignment:

hostvar = { TYPE | LENGTH | PRECISION | SCALE | DATA | INDICATOR | NAME | NULLABLE | RETURNED_LENGTH }

Examples

Example 1

For an example, see ALLOCATE DESCRIPTOR statement [ESQL].

Usage

The value n specifies the variable in the descriptor area about which information is retrieved. Type checking is performed when doing GET … DATA to ensure that the host variable and the descriptor variable have the same data type. LONG VARCHAR and LONG BINARY are not supported by GET DESCRIPTOR ... DATA.

If an error occurs, it is returned in the SQLCA.


Side effects

None

Standards

Permissions

None

See also

DEALLOCATE DESCRIPTOR statement [ESQL]

SET DESCRIPTOR statement [ESQL]