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. |