08-12-2014 02:02 AM
I have around 22 files which have the below names, all i am trying to do is import these files in sas.
Please advise any thoughts.each file should create a dataset.
08-12-2014 05:27 AM
One alternative is to pipe in a list of filenames, then call execute your import (note might not work out of the box as I am typing from memory):
filename pipe mylist 'dir "c:\somewhere\*.rpt" /b';
length buffer $2000.;
infile mylist dsd missover lrecl=32000;
input buffer $;
call execute('proc import datafile="'||strip(buffer)||'" out=work.'||strip(tranwrd(buffer,".rpt",""))||' replace;