Hi, Well, not sure wildcards can do that. This is why I tend to go for the approach of create the list of items to process then generate the necessary code as below (updated to data step read as proc import seems to be out of favour). Suppose it depends on how complicated/much needed these things are. For instance if you need to create reports on the files, i.e. how many obs, titles, getting SVN trails etc. Just seems simpler to create the list first. -- filename in_dir pipe 'dir "S:\Temp\Rob\Test" /s /b'; data all; attrib buff format=$200.; infile in_dir; input buff $; if index(upcase(buff),".TXT")=0 then delete; date_var=scan(buff,5,"\"); run; proc sql; create table bse (var1 char(1000),var2 char(1000),var3 char(10)); quit; data _null_; set all; call execute('data tmp; attrib var1 var2 format=$1000. var3 format=$10.; infile "'||strip(buff)||'" lrecl=1000 truncover dlm=","; input var1 $ var2 $; var3="'||strip(date_var)||'"; run; proc append base=bse data=tmp; run;'); run;
... View more