VVALUEX Function


VVALUEX Function

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

Category: Variable Information

Syntax

VVALUEX ( expression )

Arguments

expression

  • specifies any SAS character expression that evaluates to a variable name .

  • Restriction: The value of the specified expression cannot denote an array reference.

Details

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.

Comparisons

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

Examples

SAS Statements

Results

  date1='31mar02'd;   date2='date1';   format date1 date7.;   datevalue=vvaluex(date2);   put datevalue;  
  31MAR02  

See Also

Functions:

  • 'VVALUE Function' on page 911

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