Reads numeric values and removes embedded characters in European
currency.
- w
-
specifies the width of the input field.
- d
-
specifies the power of 10 by which to divide the value.
If the data contains a comma, which represents a decimal point, the d value is ignored.
The EUROXw.d informat reads numeric values and removes embedded euro symbols
(E), periods, blanks, percent signs, dashes, and close parentheses from the
input data. A comma is assumed to be a separator between the whole number
and the decimal portion. The EUROXw.d informat converts an open parenthesis at the
beginning of a field to a minus sign.
-
The EUROXw.d
informat is similar to the EUROw.d informat, but EUROw.d reverses the roles of the
comma and the decimal point. This
convention is common in English-speaking countries.
-
If no commas or periods appear in the input, the EUROXw.d and the
EUROw.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 eurox10.;
put x;
|
1
|
E1.23
|
input x eurox10.;
put x;
|
123
|
1.23
|
input x eurox10.;
put x;
|
123
|
1,234.56
|
input x eurox10.;
put x;
|
1.23456
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.