try to put your variables in scientific notation in &list3, your date variables in &list4 if you have any. data have; length f1 f2 $11 date1 date2 $10; input id sex (a b c d e)($) f1 f2 date1 date2; cards; 1 2 11 22 33 44 55 9.785643E13 8.785643E10 01/12/2012 2/12/2012 ; proc sql noprint; select catx(' ','input(',name,',best32.) as',name) into : list1 separated by ',' from dictionary.columns where libname='WORK' and memname='HAVE' and type ='char' and name not in ('a','b','f1','f2','date1','date2'); select name into : list2 separated by ',' from dictionary.columns where libname='WORK' and memname='HAVE' and type ='num' ; select catx(' ','input(',name,',e13.) as',name) into : list3 separated by ',' from dictionary.columns where libname='WORK' and memname='HAVE' and name in ('f1','f2'); select catx(' ','input(',name,',mmddyy10.) as',name) into : list4 separated by ',' from dictionary.columns where libname='WORK' and memname='HAVE' and name in ('date1','date2'); create table want as select &list1,&list2,&list3,&list4,a,b from have; quit; proc contents data=want;run;proc print;run;
... View more