Functions and CALL Routines |
Returns the formatted value that is associated with the argument
that you specify.
Category: |
Variable Information
|
-
expression
-
specifies a character constant, variable,
or expression that evaluates to a variable name.
Restriction: |
The value of the
specified expression cannot denote an array reference. |
If the VVALUEX function returns a value
to a variable that has not yet been assigned a length, by default the variable
is assigned a length of 200.
VVALUEX returns a character string that contains the
current value of the argument that you specify. The value is formatted by
using the format that is currently associated with the argument.
-
VVALUE accepts a variable as an argument and returns
the value of that variable. VVALUEX, however, accepts a character expression
as an argument. The function then evaluates the expression to determine the
variable name and returns the value that is associated with that variable
name.
-
VVALUE does not accept an expression as an argument,
but it does accept array references. VVALUEX accepts expressions, but the
value of the expression cannot denote an array reference.
-
VVALUEX and an assignment statement both return
a character string that contains the current value of the variable that you
specify. With VVALUEX, the value is formatted by using the current format
that is associated with the variable. With an assignment statement, however,
the value is unformatted.
-
The PUT function allows you to reformat a specified
variable or constant. VVALUEX uses the current format that is associated with
the variable.
SAS Statements |
Results |
date1='31mar02'd;
date2='date1';
format date1 date7.;
datevalue=vvaluex(date2);
put datevalue;
|
31MAR02
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.