Hi. I am trying to drop all variables in a data set when the name ends with 'obs' (eg. ASQ2CM_A5obs or ASQ60GM_C2obs) . Below is the code I am using: proc contents data=out3 out=contents(keep=name) noprint ; run; proc sql noprint ; select name into :droplist separated by ' ' from contents where upcase(name) like '%^OBS' escape '^' ; quit; data out4 ; set out3 (drop=&droplist); run; But, I get the following error message ERROR: Like pattern is not a valid pattern due to the invalid use of the escape pattern. I know a similar question has been asked already but I am having trouble figuring out the escape pattern issue. Thank you!
... View more