Object data definitions
Since each instance object is unique, it has a unique reference value that is generated by the runtime system when the instance is created. An object's reference value serves as a pointer to that specific instance. An object reference value can be thought of as a key that identifies a specific instance. The usage clause provides a means to define a data item, called an object reference, to hold an object's reference value. In the following example, data items a-checking-account and an-account are object references:
Example:
    ...
    OBJECT.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01  checking-account.
        03 customer-name    PIC X(35).
        03 current-balance  PIC S9(9)V99.
        03 date-opened      PIC 9(8).
    01  a-checking-account  USAGE IS OBJECT REFERENCE.
    01  an-account          USAGE IS OBJECT REFERENCE.
    PROCEDURE DIVISION.
    ...
 
 
 
The data item a-checking-account can be used to refer to a specific instance. A data item that has been defined as an object reference can be set equal to another data item defined as an object reference through the use of the SET statement as follows:
 
    SET an-account TO a-checking-account.
 
 
The above statement will transfer the value of the object reference in a-checking-account to an-account.