Use the ALLOCATE DESCRIPTOR statement to declare the name and allocate memory for a system-descriptor area (SDA). Use this statement with ESQL/C.


1 'descriptor'
1 descriptor_var
3.1 items
3.1 items_var
Element Description Restrictions Syntax
descriptor Name that you declare here for an unallocated system-descriptor area Enclose in single ( ' ) quotation marks. Must be unique among SDA names Quoted String.
descriptor_var Host variable that stores the name of a system-descriptor area Must contain name of unallocated system-descriptor area Language specific
items Number of item descriptors in descriptor. Default value is 100. Must be an unsigned INTEGER greater than zero Literal Number
items_var Host variable that contains the number of items Data type must be INTEGER or SMALLINT Language specific


The ALLOCATE DESCRIPTOR statement creates a new system-descriptor area, which is a location in memory that holds information that the DESCRIBE statement can display, or that holds information about the WHERE clause of a query.

A system-descriptor area (SDA) contains one or more fields called item descriptors. Each item descriptor holds a data value that the database server can receive or send. The item descriptors also contain information about the data, such as data type, length, scale, precision, and support for NULL values.

A system-descriptor area holds information that a DESCRIBE ... USING SQL DESCRIPTOR statement obtains or that holds information about the WHERE clause of a dynamically executed query.

If the name that ALLOCATE DESCRIPTOR declares for a system-descriptor area matches the name of an existing system-descriptor area, the database server returns an error. After you free the specified descriptor with the DEALLOCATE DESCRIPTOR statement, however, the ALLOCATE DESCRIPTOR statement can reuse the same descriptor name.