Help using Base SAS procedures

access MS Access database with 2 tables from SAS Unix

Reply
Super Contributor
Super Contributor
Posts: 440

access MS Access database with 2 tables from SAS Unix

[ Edited ]

Hi,

So i  have Access Database  with 2 tables dropped in one of the  folders in the share drive by another  team.

I need to import the  tables in EG SAS(Remote) and i even moved that db in my unix  folders.

 

When  trying to import the tables using the  proc  import  wizard  i get the  attached message

 

and  when running the  libname  code  from below  i get the  following error:

 

LIBNAME mylib pcfiles PATH="xxx/External/yy/xx.accdb";

 

ERROR: The SERVER= option is required for establishing a connection through the SAS/ACCESS Interface to PC Files.

 

What Server option they talking about if i have it all  in   UNIX?

Anyone please

 

PS. i have  office 2010  so it has to be  that system driver  thing whatever that means

 


error.PNG
Super User
Posts: 10,535

Re: access MS Access database with 2 tables from SAS Unix

Try it without PCFILES in the libname statement.

 

 

Super Contributor
Super Contributor
Posts: 440

Re: access MS Access database with 2 tables from SAS Unix

without pcfiles:

 

LIBNAME mylib path="&ROOTNAME/External/CP_Data/CPData_LOC_&CP_DATE1..accdb";

 

ERROR: Libname MYLIB is not assigned.

ERROR: Error in the LIBNAME statement.

 

or:

LIBNAME mylib "&ROOTNAME/External/CP_Data/CPData_LOC_&CP_DATE1..accdb";

 

ERROR: Library MYLIB is not in a valid format for access method RANDOM.

ERROR: Error in the LIBNAME statement.

 

 

tried proc import:

 

PROC IMPORT OUT= SLOCCov DATATABLE= "SLOCCov" DBMS=ACCESS REPLACE;

DATABASE="&ROOTNAME/External/CP_Data/CPData_LOC_&CP_DATE1..accdb";

SCANMEMO=YES;

USEDATE=NO;

SCANTIME=YES;

RUN;

 

ERROR: DBMS type ACCESS not valid for import.

 

Valued Guide
Posts: 505

Re: access MS Access database with 2 tables from SAS Unix

If you can post a sample accdb I am reasonably positive I can convert the tables to SAS datasets. Do not need MS acess and can handle 32 and 64bit, all can be done with the IML interface to R.

 

You can test your code using

 

SAS provides sample accdb

 

C:\Program Files\sashome\SASFoundation\9.4\access\sasmisc

demo.accdb

Super User
Posts: 5,260

Re: access MS Access database with 2 tables from SAS Unix

Isn't a PC Files Server required when accessing MS Access data from UNIX?
http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#p1ejcl3x1j6su3n1r6...
Data never sleeps
Super Contributor
Super Contributor
Posts: 440

Re: access MS Access database with 2 tables from SAS Unix

but my access data is in  unix already. I transferred the access database to my UNIX SAS folders

Will i still need the  pc file server?

Ask a Question
Discussion stats
  • 5 replies
  • 155 views
  • 0 likes
  • 4 in conversation