BookmarkSubscribeRSS Feed
PuneetS
Calcite | Level 5

Hello All,

 

I am gettign Error message when trying to assign a ACCESS library.

 

libname MS_Acc ACCESS "/data/normal/test.accdb";

 

ERROR: The ACCESS engine cannot be found.
ERROR: Error in the LIBNAME statement.

 

SAS is installed on unix server and we have access interface to PC files on it.

---SAS/ACCESS Interface to PC Files  

For SAS/ACCESS Interface to PC Files ...
Custom version information: 9.3_M2

 

any help would be much appreciate.

6 REPLIES 6
ChrisHemedinger
Community Manager

On UNIX, you would need to use the PCFILES engine in cooperation with the PC Files Server -- a small service that you have running on a Windows PC that can read/write the MS Access files for you.  On UNIX, SAS cannot read/write the MS Access file natively.

 

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Kurt_Bremser
Super User

The ACCESS libname engine is only available on Windows.

To get access to accdb files, install the PC Files Server where the MS Access files are located, and connect to that.

PuneetS
Calcite | Level 5

Thanks for the reply.

That makes it clear that I cannot use ACCESS engine for the unix machine.

But I am struggling to assign libname to MS Access database placed on my unix server.

 

This  MS Access file is placed on the same server on which SAS is installed.

 

I tried:

 

LIBNAME db PCFILES PATH='/data/test/my_acc.accdb'

ERROR: The SERVER= option is required for establishing a connection through the SAS/ACCESS Interface to PC Files.
ERROR: Error in the LIBNAME statement.
17 RUN;

 

 

LIBNAME myacc PCFILES SERVER="<unix server name>" PATH='/data/test/demo.accdb';
ERROR: A socket routine returned error: The connection was refused.
ERROR: Unable to connect to server.
ERROR: Error in the LIBNAME statement.

 

 

LIBNAME db PCFILES PATH='/data/test/myfile.accdb'
16 SERVER=localhost ;
ERROR: A socket routine returned error: The connection was refused.
ERROR: Unable to connect to server.
ERROR: Error in the LIBNAME statement.
17 RUN;

 

 

 

can someone please help. Thanks 

PuneetS
Calcite | Level 5

But my MS Access is located on the Unix server and SAS in installed on the same Unix server.

 

Is there a way in which I can assign libname to the MS Access file located on Unix server?

Kurt_Bremser
Super User

You need a WINDOWS program to get access to accdb files.

Either SAS runs on Windows and uses the MS DAO to access the DB.

Or SAS runs on UNIX, but Enterprise Guide on Windows uses the MS DAO.

Or you run the PC Files Server (which probably also uses the MS DAO) on Windows and access that via network from SAS on UNIX.

Simply placing the accdb file on UNIX does.not.work.

 

DAO = Data Access Objects

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 5160 views
  • 2 likes
  • 3 in conversation