Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Storage control built-in functions

The storage control built-in functions allow you to determine the storage requirements and location of variables, to assign special values to area and locator variables, to perform conversion between offset and pointer values, to obtain the number of generations of a controlled variable, and to reference data and methods of objects and classes. Table 60 lists the storage control built-in functions.

Table 60. Storage control built-in functions
Function
Description
ADDR
Returns the address of a variable
ADDRDATA
Returns the address of the first data byte of a string when applied to a varying string
ALLOCATE
Allocates storage of the specified size in the heap
ALLOCATION
Returns the current number of generations of a controlled variable
ALLOCSIZE
Returns a FIXED BIN(N,0) value giving the amount of storage allocated with a specific pointer
AUTOMATIC
Allocates storage of the specified size in the stack
AVAILABLEAREA
Returns the size of the largest single allocation that can be made in an area
BINARYVALUE
Converts a pointer, offset, or ordinal to an integer
BITLOCATION
Returns the bit offset of a variable within a byte
CHECKSTG
Returns a bit(1) value determining whether allocated storage is uncorrupted
CURRENTSIZE
Returns the current size of a variable
CURRENTSTORAGE
Synonym for CURRENTSIZE
EMPTY
Returns an "empty" area
ENTRYADDR
Returns the address of the routine associated with an entry
HANDLE
Returns a handle to a typed structure or union
LOCATION
Returns the byte offset of a variable within a structure
NULL
Returns a null pointer value
OFFSET
Converts a pointer to an offset
OFFSETADD
Adds an integer to an offset
OFFSETDIFF
Subtracts two offsets
OFFSETSUBTRACT
Subtracts an integer from an offset
OFFSETVALUE
Converts an integer to an offset
POINTER
Converts an offset to a pointer
POINTERADD
Adds an integer to a pointer
POINTERDIFF
Subtracts two pointers
POINTERSUBTRACT
Subtracts an integer from a pointer
POINTERVALUE
Converts an integer or handle to a pointer
SIZE
Returns the maximum size of a variable
STORAGE
Synonym for SIZE
SYSNULL
Returns a system null pointer value
TYPE
Returns the typed structure or union located by a handle
UNALLOCATED
Returns a bit(1) value indicating if a specified pointer value is the start of allocated storage
VARGLIST
Returns the address of the first optional parameter passed to a procedure
VARGSIZE
Returns the number of bytes occupied by a byvalue parameter

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)