Functions and CALL Routines |
Stores the contents of a memory address in a numeric variable
on a 32-bit platform.
Category: |
Special
|
Restriction: |
Use on 32-bit platforms only.
|
-
address
-
is a numeric constant, variable, or expression
that specifies the memory address.
-
length
-
is a numeric constant, variable, or expression
that specifies the data length.
Default: |
a 4-byte address pointer |
Range: |
2 to 8 |
If you do not have access to the memory
storage location that you are requesting, the PEEK function returns an "Invalid
argument" error.
You cannot use the PEEK function on 64-bit platforms.
If you attempt to use it, SAS writes a message to the log stating that this
restriction applies. If you have legacy applications that use PEEK, change
the applications and use PEEKLONG instead. You can use PEEKLONG on both 32-bit
and 64-bit platforms.
The PEEK function stores the
contents of a memory address into a numeric variable.
The PEEKC function stores the contents of a memory address into a character variable.
Note: SAS recommends that you use PEEKLONG instead of
PEEK because PEEKLONG can be used on both 32-bit and 64-bit platforms. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
The following example, specific to the z/OS operating
environment, returns a numeric value that represents the address of the Communication
Vector Table (CVT).
data _null_;
/* 16 is the location of the CVT address */
y=16;
x=peek(y);
put 'x= ' x hex8.;
run;
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.