Statalist


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

RE: st: SAS SAS7BDAT file into Stata9


From   sdm1@york.ac.uk
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: SAS SAS7BDAT file into Stata9
Date   Fri, 19 Oct 2007 21:20:39 +0100

Thanks Michael.  This sorts it.

Steve

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf
Of Michael Mitchell
Sent: 19 October 2007 19:49
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: SAS SAS7BDAT file into Stata9


Howdy

  I believe that the latest version of Stat/Transfer does support "compressed" SAS data files. So,
if you feel that this will be an ongoing need, perhaps this is a good time to get an upgrade (but
please check with them to verify it does read compressed files).

  Or, the alternative, as others mentioned, is to get someone with SAS to read the file and then
save it in an uncompressed form, e.g.

data "mynewfile" (compress = no);
  set "existingfile";
run;

  Best luck,

Michael

On 10/19/07, Christine E. Leonard <lchristine5@comcast.net> wrote:
> Stat Transfer doesn't support enrypted or compressed SAS files. So you 
> have to ask someone with SAS to provide the correct format, if not the 
> original creator of the file, then perhaps a friend/colleague with 
> access to SAS.  Not exactly a technical solution, but a perfectly 
> workable one. Christine Leonard
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> sdm1@york.ac.uk
> Sent: Friday, October 19, 2007 9:28 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: RE: st: SAS SAS7BDAT file into Stata9
>
> Sorry, I should have been more precise: I can't get StatTransfer7 to 
> read the .sas7bdat file.
>
> StatTransfer7 will accept either (a) SAS files for unix (*.sas7*) or 
> (b) SAS transport files (*.TPT, *.XPT).  Although the SAS file that I 
> am trying to convert has a .SAS7* extension, StatTransfer says that it 
> cannot read the file because it is compressed.
>
> Steve
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Anders 
> Alexandersson
> Sent: 19 October 2007 14:07
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: SAS SAS7BDAT file into Stata9
>
>
> Steve <sdm1@york.ac.uk> asked:
> > What is the easiest way to get a SAS7BDAT file into Stata9?
>
> Abdel Rahmen El Lahga suggested StatTransfer. Steve responded that he 
> has StatTransfer 7 but that "this won't do it". Christine Leonard 
> suggested the SAS macro %usesas but Steve responded that he does not 
> have SAS. Abdel Rahmen and Christine gave reasonable suggestions to a 
> vague problem description.
>
> Steve, if you can read the SAS file in StatTransfer 7 (or in 
> DBMS/Copy, if you have it) --you didn't
> tell-- then you should be able to save the SAS dataset into a format 
> that Stata understands, for example and older Stata dataset, and then 
> use Stata 9 to read this data and save it as a Stata 9 dataset. 
> Another option is to use a recent version of SPSS, if you have this, 
> to read the SAS dataset into SPSS and then save it as a Stata dataset 
> that your Stata 9 can read. Yet another option is to install R and use 
> its foreign package for the conversion but it is not as easy, if you 
> have never used R before.
>
> Anders Alexandersson
> andersalex@gmail.com
> *
> *   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/
>
>
> *
> *   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/
>
> *
> *   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/
>
*
*   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/

*
*   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/



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