PEEKCLONG Function: z/OS

Stores the contents of a memory address in a character variable.
Category: Special
See: PEEKCLONG Function in SAS Functions and CALL Routines: Reference

Syntax

PEEKCLONG(address<,length> )

Required Argument

address
specifies a character expression that is the memory address in binary.

Optional Argument

length
specifies the length of the character data.
Default:If no length is specified, the length of the target variable is used. If the function is used as part of an expression, the maximum length is returned.
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.

Example: Example

The following example copies the contents of the first two bytes of the character variable X to 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

See Also