%if “&head.” eq “&varstr.” %then %do;
*call another macro;
%end;
Please note that the way you are creating &varstr, there are likely multiple values in &varstr, while &head. likely contains a single value, and so this %IF command will always fail. Furthermore, you almost never want the values of macro variables to be enclosed in quotes or double quotes to do %IF comparisons.
Also please note the "curly" quotes here, indicating you pasted the SAS code into Microsoft Word or PowerPoint at somewhere along the way, SAS will never recognize these as actual quotes anyway, so SAS code in Microsoft Word or PowerPoint is never a good thing to do. So two mistakes here are fixed via
%if &head. eq &varstr. %then %do;
*call another macro;
%end;
but even that fails because &varstr likely contains multiple variable names ... and I'm not really sure what you are trying to do with this portion of code anyway ... so I'm not sure how to fix this.
--
Paige Miller