Chapter Contents

Previous

Next
PEEK

PEEK



Stores the contents of a memory address into a numeric variable

Category: Special


Syntax
Arguments
Details
Comparisons
Examples
See Also

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.


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.


Examples

The following example, specific to the OS/390 operating environment, returns a numeric value that represents the address of the Communication Vector Table (CVT).

data _null_;
      /* 16 is the location of of the CVT address */
   y=16; 
   x=peek(y);
   put 'x= ' x hex8.;
run;

See also the second example in the PEEKC function description.

See Also

Functions:

ADDR
PEEKC

CALL Routine:

CALL POKE


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.