Stores the contents of a memory address in a character variable on 32-bit and 64-bit platforms
Category: Special
See: PEEKCLONG Function in the documentation for your operating environment.
PEEKCLONG ( address <, length >)
address
specifies a character string that is the pointer address.
length
specifies the length of the character data.
Default: 8
Range: 1 to 32,767
If you do not have access to the memory storage location that you are requesting, the PEEKCLONG function returns an 'Invalid argument' error.
The PEEKCLONG function stores the contents of a memory address in a character variable.
The PEEKLONG function stores the contents of a memory address in a numeric variable. It assumes that the input address refers to an integer in memory.
The following example returns the pointer address for the character variable Z.
data _null_; x='ABCDE'; y=addrlong(x); z=peekclong(y,2); put z=; run;
The output from the SAS log is: z=AB
The following example, specific to the z/OS operating environment, returns the pointer address for the character variable Y.
data _null_; length y ; x220addr=put(220x,pib4.); ascb=peeklong(x220addr); ascbaddr=put(ascb,pib4.); y=peekclong(ascbaddr); run;
The output from the SAS log is: y= ' ASCB '
Function:
'PEEKLONG Function' on page 713