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

[no subject]

Thanks for the ribbing, Stas!  Sorry it has taken me so long to respond.
I'm in the middle of preparing for 2 papers I'm presenting at a SAS users
group conference next week.  One paper is titled "Stata for the Struggling
SAS Mind.  I'm going to be teaching _Stata_ to a bunch of SAS users!  Wish
me luck.  The other paper is on my SAS/Stata transfer programs.

Since you have a working copy of SAS and Stata, -usesas- can come to your
rescue.  It uses a SAS macro I wrote called SAVASTATA that writes out your
SAS data as a flat ASCII columnar file and then writes the Stata dictionary
file to input that file.  You could read in the SAS data file in parts if you
want using the _in_ option:

. usesas using "d:\project\MyBigHonkingFile.sas7bdat", in(1/1000000)

This would read only the first million obs.

The SAVASTATA macro figures out the minimum data type required to store your
Stata variables so it will be as compressed as the -compress- command would make it.
Unfortunately, it takes time for SAVASTATA to figure out what the minimum storage
type would be for such a large dataset.

-usesas- also figures out how much memory would be required for Stata to load the dataset
if the memory setting is lower than needed.

My SAS/Stata transfer tools are downloadable from the SSC archive but the latest and
greatest are available at the Carolina Population Center's (where I work) site:

. net install usesas , from( replace


*   For searches and help try:

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