input i $20.;
datalines;
0.125
-1.125
1.125
100.125
2.12567
-10.12345
;
run;
/*data b;*/
/*set a;*/
/*j=i-int(i);*/
/*y=input(j,$20.);*/
/*if j<0 then z=substr(y,1,5);*/
/*if j>0 then z=substr(y,1,4);*/
/*yy=int(i)+z*1;*/
/*run;*/
直接截取2位小数,即小数点后全为0.12
我这样测试了好像可行,有没有更好的方法



雷达卡


京公网安备 11010802022788号







