VVALUE Function


VVALUE Function

Returns the formatted value that is associated with the variable that you specify

Category: Variable Information

Syntax

VVALUE ( var )

Arguments

var

  • specifies a variable that is expressed as a scalar or as an array reference.

  • Restriction: You cannot use an expression as an argument.

Details

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.

Comparisons

  • 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.

Examples

SAS Statements

Results

  y=9999;   format y comma10.2;   v=vvalue(y);   put v;  
  9,999.00  

See Also

Functions:

  • 'VVALUEX Function' on page 912

  • 'Variable Information' functions in 'Functions and CALL Routines by Category' on page 270




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