AVAILABLEAREA

AVAILABLEAREA returns a size_t 1 value that indicates the size of the largest single allocation that can be obtained from the area x.

Read syntax diagramSkip visual syntax diagram
>>-AVAILABLEAREA(x)--------------------------------------------><

x
A reference with the AREA attribute

Example

  dcl Uarea area(1000);
  dcl Pz ptr;
  dcl C99z char(99) varyingz based(Pz);
  dcl (SizeBefore, SizeAfter) fixed bin(31);
  SizeBefore = availablearea(Uarea);         /* returns 1000    */
  Alloc C99z in(Uarea);
  SizeAfter = availablearea(Uarea);          /* returns 896     */
  dcl C9 char(896) based(Pz);
  Alloc C9 in(Uarea);