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