7.5.1 ALLOCATE DESCRIPTOR

Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.1 ALLOCATE DESCRIPTOR

Use the ALLOCATE DESCRIPTOR statement to allocate an SQL descriptor area:
EXEC SQL [FOR array_size] ALLOCATE DESCRIPTOR descriptor_name
[WITH MAX
variable_count];
array_size is a variable that specifies the number of array elements to allocate for the descriptor. array_size may be an INTEGER value or a host variable.
descriptor_name is the host variable that contains the name of the descriptor, or the name of the descriptor. This value may take the form of an identifier, a quoted string literal, or of a host variable.
variable_count specifies the maximum number of host variables in the descriptor. The default value of variable_count is 100.
The following code fragment allocates a descriptor named emp_query that may be processed as an array (emp_array):

7 Reference : 7.5 ECPGPlus Statements : 7.5.1 ALLOCATE DESCRIPTOR

Table of Contents Previous Next