SET DESCRIPTOR statement [ESQL]

Description

Describes the variables in a SQL descriptor area, and places data into the descriptor area.

Syntax

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

Parameters

assignment:

{ { TYPE | SCALE | PRECISION | LENGTH | INDICATOR } = { integer | hostvar } | DATA = hostvar }

Examples

Example 1

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

Usage

SET...COUNT sets the number of described variables within the descriptor area. The value for count cannot exceed the number of variables specified when the descriptor area was allocated.

The value n specifies the variable in the descriptor area upon which the assignments are performed.

Type checking is performed when doing SET...DATA to ensure that the variable in the descriptor area has the same type as the host variable.

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


Side effects

None.

Standards

Permissions

None

See also

DEALLOCATE DESCRIPTOR statement [ESQL]