Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Update to -usesas- and the SAS macro savastata on SSC

From   Dan Blanchette <>
Subject   st: Update to -usesas- and the SAS macro savastata on SSC
Date   Wed, 1 Mar 2006 10:05:29 -0500 (EST)

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.
$ savas mydata.dta
creates mydata.sas7bdat
$ 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.

Dan Blanchette

ITS Research Computing
University of North Carolina Chapel Hill

*   For searches and help try:

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