Functions and CALL Routines under z/OS |
Stores the contents of a memory address in a character variable.
PEEKCLONG(address<,length>)
|
- address
-
specifies a character expression that is the memory address
in binary.
- 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 |
If you do not have access to the memory storage location
that you are requesting, the PEEKCLONG function returns an "Invalid
argument" error.
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.
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
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.