hi all I wanted to search across all my clinical datasets that have a certain string in variable , ie i wanted to find out where that string 'LYNCH' was, unfortunately in the process ive got a lot of variables that are redundant ie have missing values, that i dont need and want to get rid of them in the final 'WANT ' dataset , however i dont know of a quick and efficient way to tell sas to delete/remove all variables that have missing values across all observations does anyone know how to do that please be indebted . /* find string / value across multiple datasets*/ proc sort data=sashelp.vcolumn out=test (keep= libname memname) nodupkey; by libname memname; where LIBNAME = 'SDTM' ; run; proc sql noprint; select 'SDTM.'||MEMNAME into :dslist separated by ' ' from test; quit; %put &dslist; data WANT /*(where=(chvars{i}))*/; set &dslist. ; array chvars{*] _character_ ; do i = 1 to dim(chvars); if index(upcase(chvars[i]),'LYNCH') then output; end; run; regards Suki
... View more