Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: How to read SAS data into Stata directly?

From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   st: Re: How to read SAS data into Stata directly?
Date   Thu, 28 Oct 2004 11:43:19 +0900

David Han wrote:

Does anyone know whether there is some command to read SAS data into
Stata directly without bothering to use file format conversion
program, such as Stat/Transfer or DBMS/Copy?


Stata can read SAS Version 5 transport files directly.  It is my understanding 
that SAS Institute does not publicly (or privately) reveal the documentation 
for any other of its dataset file types, but rather maintains it as a trade 
secret, and so, in principle, although you could write something using -file- 
by trial and error, it seems more cost-effective to license a file-conversion 

If you have SAS licensed on your system, then you can use -usesas- by Dan 
Blanchette, or -odbc- if you have the SAS ODBC drivers installed.

If not, and if you don't mind copy-and-paste routines, you can download the SAS 
System Viewer from SAS Institute for free and use that as the intermediary.  
You'll loose variable labels and so on, and even although SAS Institute wrote 
the program, itself, SAS System Viewer cannot read SAS index files or modern 
SAS catalogue files that often accompany SAS data files.  Value labels are kept 
in the catalogue file.

Joseph Coveney

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index