[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: The SAS macro savastata on SSC has been updated.
Thanks to Kit Baum, the SAS macro savastata on SSC has been updated.
I fixed a bug with numeric variables that had both positive and negative
formatted values and made a few tweaks, one of which is that the raw
ascii datafile in the SAS work directory is now deleted when -savastata-
successfully completes. This helps when processing many files in one SAS session.
None of these fixes had to do with data integrity.
The savastata program is run by the SAS system to write out your SAS dataset
to a raw ascii datafile, and write a Stata input program to read in the
dataset as well as preserve user-defined formats as value labels. Variable
labels are also preserved. The resulting Stata datafile is created in
a "compressed" state, variables that can be stored as variable type byte are
stored as that or whatever minimum storage type is required to store
your data accurately as a Stata datafile. The savastata macro then calls Stata
to read in the file and save it as a Stata datafile.
The savastata macro is also used with the Stata command -usesas- that reads
into Stata any SAS datafile type or SPSS portable file (*.por).
The complimentary program to -savastata- and -usesas- is the Stata command -savasas-
which saves Stata datasets as SAS datasets.
. ssc describe usesas
to learn more about both -savastata- and -usesas-.
. ssc describe savasas
to learn more about both -savasas-
For you Unix/Linux users who have both SAS and Stata, the c-shell script -savas-
uses both -savastata- and -savasas- to make a Stata copy of your SAS dataset or a
SAS copy of your Stata dataset. The savas script is also available on the SSC.
All programs are also available at:
Applications Analyst Programmer
Carolina Population Center UNC-CH
* For searches and help try: