I am having 40 text files in a folder with all same variables now i want to create all Text files to sas datasets with the name of the Text file names,how can i do for all them at once the text files are of differnt names a1,mmk,gds,9678c,kl89. As again the text files will be dumped day by day as the no will increse to 5000 how can i do for this.
First Thanks to OLeg_1976 for giving me good answer it has resolved 50% of my query
But i have some more to do.
In this folder daily new text file is joining and i want to create this to a dataset and append all the datasets to Final dataset. AS new Text file comes it should be created and Append to the Final Dataset .
2 Que: How can i know that the New Dataset was Created as New Text file came and how can i know the name of that particular dataset name?
filename myfiles pipe %unquote(&dir);
data list1 (compress=no);
infile myfiles truncover ;
informat date ddmmyy10. time1 $5. bytes 8. name $100. ;
input date ?? @1 @; if not missing(date) then do;
input time1 13-17 bytes 19-35 name @37;
end; else delete;
format date ddmmyy10. time hhmm.; drop time1;
filename myfiles clear;