Reads numeric values, removes embedded characters in European
currency, and reverses the comma and decimal point.
- w
-
specifies the width of the input field.
- d
-
specifies the power of 10 by which to divide the value.
If the data contains decimal points, the d value is ignored.
The EUROw.d informat reads numeric values and removes embedded euro symbols
(E), commas, blanks, percent signs, dashes, and close parentheses from the
input data. A decimal point is assumed to be a separator between the whole
number and the decimal portion. The EUROw.d informat converts an open parenthesis at the beginning of
a field to a minus sign.
-
The EUROw.d
informat is similar to the EUROXw.d informat, but EUROXw.d reverses the roles of the
decimal point and the comma. This
convention is common in European countries.
-
If no commas or periods appear in the input, then the EUROw.d and the
EUROXw.d informats are interchangeable.
The following table shows input values for currency in euros, the SAS
statements that are applied, and the results.
Values |
Statements |
Results |
|
|
----+----1----2
|
E1
|
input x euro10.;
put x;
|
1
|
E1.23
|
input x euro10.;
put x;
|
1.23
|
1.23
|
input x euro10.;
put x;
|
1.23
|
1,234.56
|
input x euro10.;
put x;
|
1234.56
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.