The following example shows how to allocate resources with the ALLOCATE COLLECTION statement for the untyped collection variable, a_set:
EXEC SQL BEGIN DECLARE SECTION; client collection a_set; EXEC SQL END DECLARE SECTION; . . . EXEC SQL allocate collection :a_set;
The following example uses ALLOCATE COLLECTION to allocate resources for a typed collection variable, a_typed_set:
EXEC SQL BEGIN DECLARE SECTION; client collection set(integer not null) a_typed_set; EXEC SQL END DECLARE SECTION; . . . EXEC SQL allocate collection :a_typed_set;
Related examples: Refer to the collection-variable example in PUT .
Related statements: ALLOCATE ROW and DEALLOCATE COLLECTION
For a discussion of collection data types in ESQL/C programs, see the IBM Informix ESQL/C Programmer's Manual.