- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
In a directory C:\MyData, reside about 30 SAS datasets. i would like to export them as tables to one big access database.
any suggestions on how to do this efficiently?
thanks in advance SAS community!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try using PROC COPY.
libname in 'c:\mydata';
libname out access 'c:\mydata\mydata.accdb';
proc copy in=in out=out;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you have SAS/ACCESS Interface to PC Files licenced then I suggest you check out PROC EXPORT.
If you don't have this product then you can still export to CSV files then use MS ACCESS to import them.
Search on MS ACCESS and PROC EXPORT on SAS support to check it further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try using PROC COPY.
libname in 'c:\mydata';
libname out access 'c:\mydata\mydata.accdb';
proc copy in=in out=out;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Like Tom's:
libname in v9 'c:\mydata';
libname out oracle path=xx user=xx password=xx ;
proc copy in=in out=out;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks everyone for your input. I'm running this on a 64 bit SAS Server running 9.2 so my slightly tweaked code looks like:
libname in 'c:\mydata';
libname out pcfiles server="SASSERVER.xxxxx.com" port=8621 path= 'c:\mydata\mydata.accdb';
proc copy in=in out=out;
run;
for some reason i'm not to get the access engine to load even when i specify it as accesscs. same goes for excel, xls, and excelcs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Any messages in the log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
331 libname in excelcs 'C:\mydata';
ERROR: The EXCELCS engine cannot be found.
ERROR: Error in the LIBNAME statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What are you trying to do?
If you are moving Excel files into Acess then just use Microsoft tools to do that.
If you are having trouble getting SAS on your Server to create a libname for an Access database then check that you have the proper SAS/Access licenses AND that you are running the proper versions of SAS and Access. THere are many threads around about 64 bit SAS not working with 32 bit Microsoft drivers and the reverse.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
64 bit SAS does not support Microsoft EXCEL ACCESS engine .
So at 64 bit environment, the only way to make a excel file is to use PCFILE server just like OP did .