Functions and CALL Routines |
Returns the formatted value that is associated with the variable
that you specify.
Category: |
Variable Information
|
Restriction: |
Use only with the DATA step
|
-
var
-
specifies a variable that is expressed as
a scalar or as an array reference.
Restriction: |
You cannot use an
expression as an argument. |
If the VVALUE 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.
VVALUE returns a character string that contains the
current value of the variable that you specify. The value is formatted using
the current format that is associated with the variable.
-
VVALUE returns the value that is associated with
the variable that you specify. VVALUEX, however, evaluates the argument to
determine the variable name. The function then returns the value that is associated
with that variable name.
-
VVALUE does not accept an expression as an argument.
VVALUEX accepts expressions, but the value of the expression cannot denote
an array reference.
-
VVALUE and an assignment statement both return
a character string that contains the current value of the variable that you
specify. With VVALUE, the value is formatted 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. VVALUE uses the current format that is associated with
the variable.
SAS Statements |
Results |
y=9999;
format y comma10.2;
v=vvalue(y);
put v;
|
9,999.00
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.