LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 3 Feb 2004 17:27:02 -0500
Reply-To:   Michelle Edwards <edwardsm@UOGUELPH.CA>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michelle Edwards <edwardsm@UOGUELPH.CA>
Subject:   Re: SAS file to SPSS file
Content-Type:   text/plain; charset="iso-8859-1"

Thanks you all for your replies - I'll have to try them out tomorrow when I'm back in the office. I'll let the list now how I make out.

Thanks again, MIchelle ___________________________________ A. Michelle Edwards, Ph.D. Academic Services, CCS Vehicle Services Bldg, University of Guelph Guelph, Ontario N1G 2W1

PH: (519) 824-4120 Ext. 54539 FAX: (519) 767-1620 Email: edwardsm@uoguelph.ca ___________________________________ ----- Original Message ----- From: <Laurel.Copeland@med.va.gov> To: <edwardsm@UOGUELPH.CA>; <SAS-L@LISTSERV.UGA.EDU> Sent: Tuesday, February 03, 2004 5:20 PM Subject: RE: SAS file to SPSS file

> FWIW, below are the contents of my crib file for going between SPSS and SAS. > This used to work. I haven't had access to SPSS in a few years. HTH, Laurel > ******************************************** > *SAS2SPSS*; > > *SAS > * Your SAS data set is in the library SASDATA; > * the data set is called SASDATA.OWEN ; > libname SASDATA 'c:\sas\mydata\'; > libname SAS2SPSS xport 'c:\sas\owen.xpt'; > proc copy in=SASDATA out=SAS2SPSS; > select OWEN; > run; > * If you are exporting a temp file, substitute 'in=WORK' > * and omit the first libname statement *; > > SPSS > COMM Example: No formatted variables . > get sas data='c:\sas\owen.xpt' . > execute . > > > * Formatted variables example > * In addition to the data step above, you must take > * care of your formats as follows > * Your formats catalog is in the library LIBRARY *; > libname library 'c:\sas\catalogs\'; > proc format library=library cntlout=fmts; > run; > libname fmt2spss xport 'c:\sas\FMTS.xpt'; > proc copy in=work out=fmt2spss; > select FMTS; > run; > > /* SPSS */ > /* If you are converting a SAS formats catalog as well as a SAS data > /* set then you should use these commands */ > > get sas data='c:\sas\owen.xpt' /formats='c:\sas\fmts.xpt'. > execute . > > ***FROM SPSS TO SAS**** . > /* In SPSS */ > COMM Watch dates during this process . > print format date DOB (Adate10) . > exec . > EXPORT OUTFILE='C:\safe\stuff.por'. > > /* In SAS */ > libname somethin SPSS 'c:\safe\stuff.por'; > data stuff; set somethin.stuff; run; > ******************************************** > > -----Original Message----- > From: edwardsm@UOGUELPH.CA [mailto:edwardsm@UOGUELPH.CA] > Sent: Tuesday, February 03, 2004 12:44 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: SAS file to SPSS file > > Good day all! > > I'd just like to add a little note to the transition from SAS to SPSS > datafiles. We use DBMSengines here on Campus to move from SAS to SPSS... > HOWEVER..... I have not found a way to maintain the library formats in SAS > when moving to SPSS. I can select SPSS sav files or SPSS por files - > either > way it does not maintain the variable value labels. > > Has anyone else encountered this and maybe found a way around it? SAS > suggested I tried DBMS Copy on my SUN system to accomplish this... > > Thanks, > Michelle > ___________________________________ > A. Michelle Edwards, Ph.D. > Academic Services, CCS > Vehicle Services Bldg, University of Guelph > Guelph, Ontario > N1G 2W1 > > PH: (519) 824-4120 Ext. 54539 > FAX: (519) 767-1620 > Email: edwardsm@uoguelph.ca > ___________________________________ >


Back to: Top of message | Previous page | Main SAS-L page