There is another way.
[pre]
%let mypath=d:\data\2011\sks;
data mydir;
length dsn $ 100;
dir = "&mypath";
rc = filename("readdir","&mypath");
did = dopen("readdir");
memcount = dnum(did);
if memcount>0 then do;
do i = 1 to memcount;
dsn = dread(did,i);
output;
end;
end;
rc=dclose(did);
drop rc did memcount i;
run;
[/pre]
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.