Wednesday, March 01, 2006
st: Update to -usesas- and the SAS macro savastata on SSC
Thanks to Kit Baum the SAS macro savastata that saves SAS data files as Stata data files has been updated on the SSC archive. The -usesas- command uses the savastata macro to load a SAS dataset directly into Stata so if you use -usesas- submit the Stata command: . ssc install usesas, replace This is also the best way of simply updating your copy of the SAS macro savastata.
There is also a c-shell Unix/Linux script called savas ("save as") that uses the savastata macro. This script is similar to the sas2stata script but it also makes Stata files from SAS files. It knows what file type to create based on the file extension. So: $ savas mydata.dta creates mydata.sas7bdat and: $ savas mydata.sas7bdat creates mydata.dta
The bug fix in savastata was rather minor, but savastata will now again preserve SAS formats for special missing values as Stata value labels. So: .a = "Refused" .b = "Don't know" will be preserved in Stata as value labels.
Best, Dan Blanchette
ITS Research Computing University of North Carolina Chapel Hill Dan_Blanchette@unc.edu
* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/
Links to this post: