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

I have a case where it is necessary to generate and read dbf files from SAS Enterprise Guide. Due to not having the SAS component Access to pc file licensed, I must look for an alternative.

In the licensed components there is the SAS connect to odbc so I have thought about solving the situation by configuring a library of this type.

I had not worked a similar case, whenever I have worked with dbf files I have used the proc export.

I would like to know if any expert colleague from the community has worked on these files via odbc library.

Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
AlanC
Barite | Level 11

Wow. Haven't seen a dbf file in decades. Why not use Excel's ability to read it and then convert to something else? MS also still has FoxPro drivers available. See here: Visual FoxPro Downloads | Microsoft Docs. You can also do a OleDb to ODBC conversion. Also, look here for connection strings and an ODBC driver: DBF / FoxPro connection strings - ConnectionStrings.com

https://github.com/savian-net

View solution in original post

6 REPLIES 6
SASKiwi
PROC Star

What software is being using on the DBF side? I did see this SAS Note which may be helpful. Apart from SAS/ACCESS to ODBC, you also need a compatible ODBC driver installed on the computer where your SAS session is running. If its your PC you can install that yourself. If you use a remote SAS server, then it's a job for your SAS administrator.

SAS_LuisBolivar
Quartz | Level 8

Good Morning.


Thanks for the comments from him.


What happens in this case.


The client was working with a very old version of SAS, with the version of SAS Enterprise Guide they were using it was possible to export to this file.

 

guideversionold.jpeg

 

When performing the new installation of SAS 9.4 M7, the SAS Enterprise Guide version does not have this format available within the Step Export.

 

We have offered the option to append the SAS Access to PC File component to the license, but due to budget issues, it is currently not possible to append the component.

 

Reading a little SAS documentation I found this information:

 

"Open database connectivity (ODBC) standards provide a common interface to a variety of databases, including AS / 400, dBASE, Microsoft Access, Oracle, Paradox, and Microsoft SQL Server databases"

 

In my case, I have never had the need to establish a library of this type of DBF file, so I see the need to consult the community.

I did some tests in a non-productive environment, performing the following steps:

 

1. the driver download from the following link: https://www.microsoft.com/en-us/download/details.aspx?id=54920 

 

2. configure the odbc at the operating system level

 

ConfigurarODBC.jpeg

 

3. work with the library, using querys en guide.

 

ejemplodeguide.jpeg

4. I generate the dbf by query instead of an export

 

arvhivosgenerados.jpeg

 

It is a solution that does not give the user total autonomy, since the user will need the data and the path established in the library

configuration, but I understand this solution can solve the situation we are presenting. It's just generating two dbf's.

 

I would like your comments on what I am raising.

 

I understand that the correct solution is to append the SAS Access to PC Files component.

 

Thanks.

 

SASKiwi
PROC Star

Your approach looks good to me. I'm surprised anyone still uses DBF as its such a old format. It originated way back in the early days of PCs in a product called dBase.

AlanC
Barite | Level 11

They can also do the allocation using the following syntax (adapt to your needs). I prefer this so you don't have to set up the connection in the ODBC sources: 

 

libname mylib odbc noprompt="driver=SQL Server Native Client 10.0;server=server-name;uid=user-ID;pwd=password            database=SQL-database"  schema=schema-name; 

 

See the link I put in my other answer and get the dBase connection string from the connection strings website (it is the best place for all connection strings).

 

https://github.com/savian-net
SASKiwi
PROC Star

@AlanC  - Agreed. We use exactly the same approach with defining everything in the connection string, and the connection string website you've provided is one we use a lot too. 

AlanC
Barite | Level 11

Wow. Haven't seen a dbf file in decades. Why not use Excel's ability to read it and then convert to something else? MS also still has FoxPro drivers available. See here: Visual FoxPro Downloads | Microsoft Docs. You can also do a OleDb to ODBC conversion. Also, look here for connection strings and an ODBC driver: DBF / FoxPro connection strings - ConnectionStrings.com

https://github.com/savian-net

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 6 replies
  • 1192 views
  • 5 likes
  • 3 in conversation