BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SAShole
Pyrite | Level 9

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Try using PROC COPY.

libname in 'c:\mydata';

libname out access 'c:\mydata\mydata.accdb';

proc copy in=in out=out;

run;

View solution in original post

8 REPLIES 8
SASKiwi
PROC Star

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.

Tom
Super User Tom
Super User

Try using PROC COPY.

libname in 'c:\mydata';

libname out access 'c:\mydata\mydata.accdb';

proc copy in=in out=out;

run;

Ksharp
Super User

Like Tom's:

libname in v9 'c:\mydata';

libname out  oracle path=xx user=xx password=xx ;

proc copy in=in out=out;

run;

SAShole
Pyrite | Level 9

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.

FloydNevseta
Pyrite | Level 9

Any messages in the log?

SAShole
Pyrite | Level 9

331  libname in excelcs 'C:\mydata';

ERROR: The EXCELCS engine cannot be found.

ERROR: Error in the LIBNAME statement.

Tom
Super User Tom
Super User

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.

Ksharp
Super User

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 .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 3434 views
  • 1 like
  • 5 in conversation