From SAS Help:
Syntax
PERCENTw.d
Syntax Description
w
specifies the width of the input field.
Default: 6
Range: 1-32
d
optionally specifies the power of 10 by which to divide the value. If the data contain decimal points, the d value is ignored.
Range: 0-31
--------------------------------------------------------------------------------
Details
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.
觉得很难说清楚,CV了SAS的帮助
下面的代码和输出可能说明一些问题
LOG:
126 data _null_;
127 input x:percent8. y:percent8.2 z:percent8.4;
128 put x= y= z=;
129 datalines;
x=323 y=3.23 z=0.0323
x=3.23 y=0.0323 z=0.000323
x=0.2 y=0.2 z=0.2
x=3.22222 y=0.04322 z=0.031222
NOTE: “DATA 语句”所用时间(总处理时间):
实际时间 0.00 秒
CPU 时间 0.00 秒
134 ;
135 run;
1 源数据有%,则源数据 /100 否则不除
2 源数据有小数点,源数据导入,无小数点则按percentw.d的中源数据 /10^d输入
我开始晕了,求高手补充