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!
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.
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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.