Date: Wed, 3 Jan 2001 17:42:02 -0500
Reply-To: harding faulk <hfaulk@cheyney.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: harding faulk <hfaulk@CHEYNEY.EDU>
Organization: CHEYNEY UNIVERSIRY
Subject: CONVERTING STRING TO NUMERIC VARIABLES
Content-Type: multipart/alternative;
I'm converting course names that are string variables into CIP codes that are numeric variables. Initially, the Recode function worked perfectly. Then I expanded the list of recodes. Once this list was finished I got the following message: "A string variable cannot be recoded to a numeric value. Consider the CONVERT or INTO options. This command not executed." I checked the an SPSS syntax manual, release 6.0 and revised the recode statement. It's still not working.
Here is a truncated version of the script:
Get
File=C:\CCAR99\SDMSU99.sav'.
EXECUTE
RECODE
NUCOURSE('XEA'=1304) ('PHE'=3103) ('XEF'=1312) into cipcrs.
VARIABLE LABELS cipcrs'cip course'.
EXECUTE.
After the error message, I revised the script:
Get
File=C:\CCAR99\SDMSU99.sav'.
EXECUTE
RECODE
#NUCOURSE (CONVERT)
('XEA'=1304) ('PHE'=3103) ('XEF'=1312) into cipcrs.
VARIABLE LABELS cipcrs'cip course'.
EXECUTE.
This didn't work either. SPSS didn't recognize "#NUCOURSE." What did I do wrong?
[text/html]