STORAGE condition

Enables the program to gain control when an ALLOCATE built-in function or ALLOCATE statement failed after attempting to allocate BASED or CONTROLLED storage outside of an AREA.

Enabled/Disabled status

Always enabled.

Result

Can be any of the following depending on the type of variable:
  • After an ALLOCATE statement for a controlled variable, no allocation is made for that variable's generation. A reference to the controlled variable results in accessing the generation (if any) before the ALLOCATE statement.
  • After an ALLOCATE statement for a based variable, no allocation is made for that variable, and its associated pointer is undefined.
  • After an ALLOCATE built-in function for a based variable, no allocation is made for the variable and the use of the associated pointer is undefined.

Raised

Upon failure of an ALLOCATE built-in function or ALLOCATE statement that attempted to allocate BASED or CONTROLLED storage outside of an AREA. The STORAGE condition allows the program to gain control.

Notes

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

Other Information

Condition codes
450, 451
Implicit action
Raises the ERROR condition.
Normal return
Raises the ERROR condition.