There are several ways to import DBF files in SAS. First, there is PROC DBF:
filename dbfin 'employee.dbf'; proc dbf db5=dbfin out=employee; run;
But in my environment (SAS 9.1.3 Windows XP; and SAS 9.2 on Windows Server 2008 with Enterprise Guide 4.2 on Windows XP) this gives the error ERROR: Procedure DBF not found.
Another way is to use PROC IMPORT:
proc import dbms=dbf datafile="employee.dbf" out=employee; run;
But that gives me ERROR: DBMS type DBF not valid for import. These errors probably either mean I didn’t install something during the (long and tedious) SAS installation, or I don’t have the proper license from SAS.
The simplest, quickest solution is to use the %dbf2sas macro written by Richard Hockey.
%include "dbf2sas.sas"; /* download this file using the link above */ %dbf2sas(in=employee.dbf, out=employee);