Thank you,
Liz
RECODE VSTRING (CONVERT) INTO VNUMERIC.
where VSTRING is the string variable and VNUMERIC is the new numeric
variable.
If some cases contain alphanumeric data you can specify which values these
should be recoded into: e.g.:
RECODE VSTRING (CONVERT) ('-' = 11)('&' = 12) INTO VNUMERIC.
Otherwise, cases with other alphanumeric data will be recoded into "system
missing".
Svein Åge Relling
Trondheim kommune, Norway
ABCX = the original string "number"
NUMX = new number you want
Two different approaches - both should work:
COMPUTE NUMX = NUM(ABCX, F5.0). /* use whatever format you want in "F5.0"
EXECUTE.
or
RECODE ABCX (CONVERT) INTO NUMX.
FORMAT NUMX (F5.0).
EXECUTE.
Good Luck
li...@unr.nevada.edu (lizg) wrote in message news:<5bad192.01080...@posting.google.com>...
I've also tried this code, which does the same thing (new variable, no
data converted - blank cells instead).
RECODE poc1_1 (CONVERT) INTO trynow.