It is a pain trying to do that in macro language, but since you are already generating some SAS code why not generate some SAS code to add the quotes and percent signs?
data _null_;
call symputx('catg0_like',quote('%'||symget('catg0')||'%',"'"));
run;
proc sql noprint feedback;
create table XYU as
select a.*
from tableb a
where companyname like &catg0_like
;
quit;
... View more