ALLOCATE is a storage control built-in function, which allocates storage of the specified size in the heap. You can also use ALLOCATE to allocate the specified size in the specified area.
When you specify ALLOCATE(n), ALLOCATE allocates storage of size n in heap storage and returns the pointer to the allocated storage. If necessary, n is converted to REAL FIXED BINARY(31,0). If the requested amount of storage is not available, the STORAGE condition is raised.
The ALLOCATE built-in function now has the AREA reference as a new optional argument. 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
For more information, see Built-in functions, pseudovariables, and subroutines.