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

Re: st: from stata to SAS

From   "Joseph Coveney" <>
To   "Statalist" <>
Subject   Re: st: from stata to SAS
Date   Thu, 4 Oct 2007 11:05:40 -0700

Tim Wade wrote:

I suggest using SAS proc import, which is very flexible, like this:

. sysuse auto.dta
(1978 Automobile Data)

. outsheet _all using test.txt, comma replace noquote

proc import datafile="C:\DATA\test.txt"


I take it that the -noquote- option is mandatory for a direct-to-SAS path
(as opposed to the Stata-Excel-SAS path that Juzhi was originally trying
for).  It presupposes that none of Juzhi's variables are string containing
an imbedded comma in any observation.  I was led to believe that in such
cases SAS has, er, longstanding known issues
( ),
something about the consequences of Cary being downwind from Redmond.

I haven't followed closely--was there a reason that Juzhi cannot
use -fdasave-?  An advantage is that variable labels will be conveyed.  A
disadvantage is the length limit on variable names.

Joseph Coveney

*   For searches and help try:

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