IBM Extension

Format 5 - Pointer Data Item

When Format 5 of the SET statement is executed, the current value of the receiving field is replaced by the address value contained in the sending field.

Read syntax diagramSkip visual syntax diagram
SET Statement - Format 5

        .------------------------------.   
        V                              |   
>>-SET----+-identifier-4-------------+-+------------------------>
          '-ADDRESS OF--identifier-5-'     

>--TO--+-identifier-6-------------+----------------------------><
       +-ADDRESS OF--identifier-7-+   
       +-NULL---------------------+   
       '-NULLS--------------------'   

identifier-4
Receiving fields.

Must be described as USAGE IS POINTER.

ADDRESS OF identifier-5
Receiving fields.

This is the ADDRESS OF special register.

Must be a level-01 or level-77 item defined in the Linkage Section. It is set to the value of the operand specified in the TO phrase. It cannot be subscripted or reference modified.

identifier-6
Sending field.

Must be described as USAGE IS POINTER.

Must not contain an address within the program's own Working-Storage, Local-Storage or File sections.

ADDRESS OF identifier-7
Sending field.

Must be an item in the data division section of any level except 66 or 88.

ADDRESS OF identifier-7 contains the address of the identifier, rather than its contents. Identifier-7 can be subscripted, reference modified, or both.

NULL, NULLS
Sending field.

Sets the receiving field to contain the value of an invalid address.

End of IBM Extension