PEEKCLONG Function


PEEKCLONG Function

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.

Syntax

PEEKCLONG ( address <, length >)

Arguments

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

Details

If you do not have access to the memory storage location that you are requesting, the PEEKCLONG function returns an 'Invalid argument' error.

Comparisons

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.

Examples

Example 1: Example for a 32-bit Platform

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

Example 2: Example for a 64-bit Platform

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 '

See Also

Function:

  • 'PEEKLONG Function' on page 713




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