Can somebody please say what the problem is with this piece of code: %let columns = countn <figure> hazardratio hrlowercl hruppercl;
%let l_fign = %sysfunc(findw(&columns,<figure>,%str( ),ei));
%put [&l_fign]; The problem seems to lie with the space delimiter %str( ). It gives the right "answer" [2] but it also gives this error: ERROR: %SYSEVALF function has no expression to evaluate. (Interestingly, with this error present, some sql code further down in my macro simply fails to run, although it mprint-s.) If the values in COLUMNS are, say, $-delimited, the problem goes away: %let l_fign = %sysfunc(findw(%sysfunc(prxchange(s/\s+/\$/,-1,&columns)),<figure>,$,ei));
%put [&l_fign]; An explanation would be greatly appreciated, as would a suggestion as to how to get the code to run error-free with a space delimiter. I'm using SAS 9.4M3 on Linux X64.
... View more