STORAGE condition

Status
STORAGE is always enabled.
Result
The result depends on the type of variable for which attempted storage allocation raised the condition.
  • After an ALLOCATE statement for a controlled variable, that variable's generation is not allocated. A reference to that controlled variable results in accessing the generation (if any) before the ALLOCATE statement.
  • After an ALLOCATE statement for a based variable, the variable is not allocated and its associated pointer is undefined.
  • After an ALLOCATE built-in function for a based variable, the variable is not allocated and the use of the associated pointer is undefined.
Cause and syntax
The STORAGE condition allows the program to gain control for the failure of an ALLOCATE built-in function or ALLOCATE statement that attempted to allocate BASED or CONTROLLED storage outside of an AREA. Failure of an ALLOCATE statement in an AREA raises the AREA condition.

Failure of the AUTOMATIC built-in function does not raise the STORAGE condition.

The ON-unit for the STORAGE condition can attempt to free allocated storage. If the ON-unit is unable to free sufficient storage, it can provide the necessary steps to terminate the program without losing diagnostic information.

Read syntax diagramSkip visual syntax diagramSTORAGE
Implicit action
The ERROR condition is raised.
Normal return
The ERROR condition is raised.
Condition codes
450, 451