Allocate memory for a system-descriptor area
To allocate memory for a system-descriptor area, use the ALLOCATE DESCRIPTOR statement.
The ALLOCATE DESCRIPTOR statement performs the following
tasks:
- It assigns the specified descriptor name to identify this region of memory. This name is an identifier that must be provided in all the SQL statements listed in SQL statements that can be used to manipulate a system-descriptor area to designate the system descriptor on which to take action.
- It allocates item descriptors. By default, it allocates 100 item descriptors in the system-descriptor area. You can change this default with the WITH MAX clause.
- It initializes the COUNT field in the system-descriptor area to the number of item descriptors allocated.
Important: ALLOCATE DESCRIPTOR does not allocate
memory for column data (DATA field). This memory is allocated by the
DESCRIBE statement on an as-needed basis. For more information, see
the next section.