On Dec 29, 4:40 pm, STran <st.t...@gmail.com> wrote:
> I have a dataset full of coded variables. I would like to create a new
> dataset from the original, pulling out only variables that contain a
> specific string of characters in them. In this case, the specific
> string of characters is at the end of the variable name.
> data_have variables:
> data_want variables (all those containing "fpop"):
> Thanks for your help.
proc sql noprint;
select name into :nameList separated by ' '
where upcase(memname) = 'DATA_HAVE' & index(upcase(name), 'FPOP') > 0
create table data_want as