ILE COBOL Language Reference

+-------------------------------IBM Extension--------------------------------+

ADDRESS OF

ADDRESS OF refers to the calculated address of a data item. The data item can be reference modified or subscripted. You may take the ADDRESS OF any Data Division item that is not a type-name or a subordinate of a type-name, and that does not have level number 66 or 88. Such an address can be referenced, but not changed.

The ADDRESS OF an item is implicitly defined as USAGE IS POINTER.

ADDRESS OF Special Register

The ADDRESS OF special register is the starting address of the data structure from which all calculated addresses are determined.

It exists for each record (level number 01 or 77) in the Linkage Section, except for those records that redefine each other. In such cases, the special register is similarly redefined.

This special register is implicitly defined as USAGE IS POINTER, and you can change it.

If you reference modify the ADDRESS OF identifier, it is no longer the starting address of a data structure. It is a calculated address.

You can specify the ADDRESS OF or ADDRESS OF special register as an argument to the LENGTH function. If the ADDRESS OF or ADDRESS OF special register is used as the argument to the LENGTH function, the result is always 16, independent of the identifier specified for ADDRESS OF.

A function-identifier is not allowed in either the ADDRESS OF or the ADDRESS OF special register.

A date-time data item can be used in expressions involving the ADDRESS OF or ADDRESS OF special register.

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]