SAS 9.1.3 currently supports Stata up to version 9 via proc import. The following example shows how to use SAS proc import to read in a Stata data file hsb2.dta. It is advisable to check the log file and use proc contents to ensure the data have been read correctly. Notice that SAS recognizes the file type to be imported by file extension.
proc import out= hsb2 datafile = "c:\data\hsb2.dta"; run; proc contents data=hsb2; run;
It is easy to save a data file as a version 9 file with the saveold command. The saveold command in Stata 10 saves a Stata version 10 data file as a Stata version 9 file. Here is an example.
use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
(highschool and beyond (200 cases)) saveold "c:\data\hsb2old.dta" file c:\data\hsb2old.dta saved
The most updated version of Stat/Transfer will recognize Stata 10 files and converting Stata data files to SAS is fairly straightforward.
The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.