jias2009 发表于 2010-1-24 15:37 
用楼上的方法可以解决的。
substr(string,-1,2)
可以解决???????
148 data _null_;
149 x=substr('abcde',-1,2);
150 put x=;
151 run;
NOTE: Invalid second argument to function SUBSTR at line 149 column 4.
x=
x= _ERROR_=1 _N_=1
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds