I need to get the index of a macro value in another macro string. findw seemed like it would work for this but it does not work with sysfunc. I made an example below.
the code below sets varfind = 0 and varfinddata =3; the warning message is:
WARNING: In a call to the FINDW function or routine, the modifier "'" not valid.
quoting the space such as
varfind = %sysfunc(findw("&testin","&count",%str(" "), %nrstr(%str('E')) ));
does not seem to help. what is failing when trying to use sysfunc?
%let testin =v vsd count f;
%let count =count;
%macro test();
var="&testin";
varfind = %sysfunc(findw(&testin,"&count",' ', 'E'));
varfinddata=findw("&testin","&count", ' ', 'E');
%mend test;
data a;
%test
run;
... View more