10-27-2016 02:22 PM - edited 10-27-2016 02:24 PM
My requirement is to import many .txt files each with differant layout all at once.And to save them as sas datasets in work library.Can someone please help me on this.Thanks!
NOTE:I cannot make copy of files and store them in one temp location.File sizes are huge
10-27-2016 02:35 PM
You can write a macro.
How do you know where the files are? Do you have a list, all in a folder?
10-27-2016 06:27 PM
You can use a script to determine all the files in the folder (Assuming Windows);
Once those are in a dataset you can call the import macro using call execute.
%macro import_text_file(path, out); proc import data=&out datafile="&path" dbms=dlm; delimiter='|'; getnames=yes; run; %mend;