bobguy 发表于 2013-2-21 07:46 
You can wrap it up into a string with macro functions embedded and use resolve to solve it in the sa ...

要是a="5+sum(2.1,exp(5.312))";呢
搜索所有函数,然后加%sysfunc吗
You can wrap it up into a string with macro functions embedded and use resolve to solve it in the same step.
data tmp;
a="5+sum(2.1,5.312)";
astr=catt('%sysevalf(', scan(a,1,'+'),'+%sysfunc(',scan(a,2,'+'),'))');
call symputx('avalue',astr);
b=input(resolve('&avalue'),best.);
put a b;
run;