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 (April 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 4 Apr 2007 13:38:10 -0400
Reply-To:   "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject:   Re: SPSS to SAS including the Value Labels please.
In-Reply-To:   <Pine.GSO.4.05.10704041227220.23058-100000@callisto.acsu.buffalo.edu>
Content-Type:   text/plain; charset=us-ascii

> From: necia > I have a student who is having difficulty trying to convert > an SPSS data files to SAS (that works OK) AND have all the > SPSS value labels become "value labels" in SAS. I surely > appreciate your help!! > > Her words: > > "I figured out how to convert the SPSS data files to SAS > files. However, I could not still figure out how to bring > the names of the values in each variable from SPSS to SAS." > > "For example, the variable death, was coded as 0 and 1 in > SPSS. 0 corresponds to life sentence; 1 corresponds to death > sentence. Based on the SAS datafile converted from SPSS > daata file, we cannot tell which number (0 or 1)corresponds > to "life sentence" or "death sentence". We have to go back > to the SPSS file to make sure which number was coded which way.? > > Is there any way to bring the name of the values in each > variable from SPSS to SAS?" > > The curious, including me, want to know. Thanks!

this does not read like "I want the variable label in SPSS to be the variable label in SAS."

You probably want to read the documentation quite a bit more thoroughly. I had this problem once and the choices were: you get either the * variable name * variable label but not both.

You will need a SAS format in order to work with the values:

proc format; value TF 0 = 'false' 1 = 'true' other = 'n/a'; value $sentence 0 = 'life' 1 = 'not life' other = 'n/a';

Eventually you will need the data dictionary from which the SPSS data were prepared.

suggestion: SPSS: export to .csv SAS : import from .csv

Ron Fehd the data dictionary or macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


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