ALLOCATE

ALLOCATE allocates storage of size n in heap storage and returns the pointer to the allocated storage. You can also use ALLOCATE to allocate the specified size in the specified area.

Read syntax diagramSkip visual syntax diagramALLOCATE( n,x)

Abbreviation: ALLOC

n
Expression. Nonnegative value that represents the storage size to be allocated. If necessary, n is converted to type size_t 1.

If the requested amount of storage is not available, the STORAGE condition is raised.

x
AREA reference. When you specify ALLOCATE(n, x), the specified number of bytes n is allocated within that area. The number is rounded up to a multiple of 8.

If there is insufficient space within the specified area, the AREA condition is raised.