>>-ALLOCATE DESCRIPTOR--+-'descriptor'---+----------------------> '-descriptor_var-' >--+-------------------------+--------------------------------->< '-WITH MAX--+-items-----+-' '-items_var-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
descriptor | Name of an unallocated system-descriptor area | Enclose in single ( ' ) quotes. 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 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 nullability.
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 statement.
If the name that you assign to a system-descriptor area matches the name of an existing system-descriptor area, the database server returns an error. If you free the descriptor with the DEALLOCATE DESCRIPTOR statement, however, you can reuse the same descriptor name.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]