Returns the memory address of a character variable on 32-bit and 64-bit platforms
Category: Special
ADDRLONG ( variable )
variable
specifies the variable name that points to the memory address.
The return value is a character variable that contains the binary representation of the pointer. To display this value, use the $HEX w . format to convert the binary value to its hexadecimal equivalent.
Note: If you used the ADDR function and defined an instance of the pointer as numeric by using a LENGTH statement in your program, substituting ADDR for ADDRLONG will fail because ADDRLONG requires a character argument.
The following example returns the pointer address for the variable ITEM, and formats the value.
data characterlist; item=6345; x=addrlong(item); put x $hex16.; run;
The following line is written to the SAS log:
480063B020202020