yongyitian 发表于 2013-12-28 10:17 
Try this
%macro findpositon(source, target);
%let pos1=%sysfunc(findw(%sysfunc(compbl(&source)),&target));
%let pos2=%sysfunc(ifc(%sysfunc(mod(&pos1,2))=0, %eval(&pos1/2), %eval((&pos1+1)/2)));
%put The postion is &pos2;
%mend;
%findpositon(3 44 5,4 )
%findpositon(3 4 5,5 )