Reads percentages as numeric values.
-
w
-
specifies the width of the input field.
-
d
-
specifies the power of 10 by which to divide
the value. If the data contain decimal points, the d
value is ignored. This argument is optional.
The PERCENTw.d informat converts the numeric portion of the input data
to
a number using the same method as the COMMAw.d informat. If a percent sign (%) follows the number in the
input field, PERCENTw.d
divides the number by 100.
input @1 x percent3. @4 y percent5.;
Data Line |
Results |
----+----1----+
|
|
1% (20%)
|
0.01 -0.2
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.