UNALLOCATED

UNALLOCATED returns a bit(1) value indicating whether or not a specified pointer value is the start of a piece of allocated storage. To use this built-in function, you must also specify the CHECK(STORAGE) compile-time option.
Read syntax diagramSkip visual syntax diagram
>>-UNALLOCATED(P)----------------------------------------------><

p
Pointer expression.

UNALLOCATED returns the bit(1) value '1'b if the specified pointer value is not the start of a piece of storage that is obtained with the ALLOCATE statement or the ALLOCATE built-in function.

Note that the pointer passed to UNALLOCATED is "rounded down" to the nearest doubleword and that rounded value is compared against all allocated addresses when similarly rounded down.