PEEK Function


Stores the contents of a memory address into a numeric variable on a 32-bit platform

Category: Special

Restriction: Use on 32-bit platforms only.

Syntax

PEEK ( address <, length >)

Arguments

address

  • specifies the memory address.

length

  • specifies the data length.

  • Default: a 4-byte address pointer

  • Range: 2 to 8

Details

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.

Comparisons

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.

Examples

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; 

See Also

Functions:

  • 'ADDR Function' on page 295

  • 'PEEKC Function' on page 709

CALL Routine:

  • 'CALL POKE Routine' on page 352




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net