Thursday, January 14, 2010

Importing Excel/DBF Files to SAS Datasets Using DDE

Importing Excel Files Into SAS Using DDE

What in the world is DDE and why use it? Good question... DDE is “Dynamic Data Exchange” and is a method of accessing data from one MS-Windows application by another. As a SAS user, you can use DDE within a DATA step to import data into SAS and export data from SAS. Using DDE involves SAS code and statements that other MS-Windows applications understand. But, why bother with DDE when other methods are available? What about the IMPORT and EXPORT procedures? Or, Open Database Connectivity (ODBC)? How about SAS Enterprise Guide? These alternatives are useful under the right conditions. For example, the PROC IMPORT and PROC EXPORT are simple to use, but are limited in the way you can define your data and these procedures require you license SAS/ACCESS For PC Formats. Bummer. ODBC is also simple to use, but importing data into SAS using ODBC requires you license SAS/ACCESS For ODBC. Bummer again. And, the new Excel LIBNAME engine? Oh, that also requires you license SAS/ACCESS For PC Formats. Bummer times three. SAS Enterprise Guide is very simple, and does not require you license anything other than BASE SAS. Hmm. Oh yes, SAS Enterprise Guide doesn’t offer quite the flexibility as DDE, because when using DDE you have all the features of the SAS DATA step. Also, using DDE in a SAS DATA step makes it easy to adapt the import process for repeatable uses. A SAS DATA step using DDE only requires BASE SAS running under MS-Windows.


Importing DBF files to SAS Datasets


Alex said...

Yesterday evening I was in difficult situation..all my dbf fiels were lost. For luck in that day I was succeeded and found in the Internet - dbase recover. It solved my problem for seconds and showed me how it restored a maximum of information from damaged DBF tables.

Post a Comment