SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
ThuyPhi
Calcite | Level 5

Hello everyone!

I have a SAS code that used to work on PC.  However, I now have to run it in Linux and the code to access database is not working anymore.

 

Before: 

PROC IMPORT DBMS=ACCESSCS DATATABLE='2014_Platform'
OUT=WORK.gwei14 REPLACE;
DATABASE= 'C:\Users\..\2014_Platform_Inventory.accdb';
RUN;

 

Now:

libname offshr access "/2014_Platform_Inventory.accdb" ;
run;

 

I got this error:

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

 

Please help me how to access a database in Linux 9.4!

Thank you so much!

4 REPLIES 4
ballardw
Super User

First thing is you want to use paths starting at the root of a drive or the mount point.

 

Second, run this code:

 

Proc Setinit;

run;

 

You need to have the  SAS/Access to PC Files to use the Access and Excel engines such as ACCESSCS. If you do not see that in the proc setinit output in the log, such as

---SAS/ACCESS Interface to PC Files

then you aren't licensed and would need an update to the license to include the license.

If the PC files appears in the log then run:

 

Proc Product_status;

run;

If you don't see something like this in the log

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

then it just wasn't installed and you need to reinstall and include the PC files.

 

 

 

ThuyPhi
Calcite | Level 5
Oh I see. You're right; I do not have license for PC files.
Thank you!
SASKiwi
PROC Star

As well as the licence you will need to use the SAS PC Files Server for this to work on Linux. It is a free download from SAS. 

Ksharp
Super User
One way is save this access file into CSV file and import again.
Alternative way is using PC Files Server, if you set up at Linux side .

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 1018 views
  • 1 like
  • 4 in conversation