Hi Ismail,
It looks like you are missing command terminators (periods) after your compute statements. Also, be sure that the "howoldareyou" variable is string if you'll be encapsulating the values within quotes.
HTH
John Norton
SPSS Inc.
Can some one tell me what is wrong with this syntax? Every time and run it it SPSS give me an error that reads like this:
>Error # 4305 in column 1. Text: COMPUTE >A relational operator may have two numeric operands or two character string >operands. To compare a character string to a numeric quantity, consider using >the STRING or NUMBER function. >This command not executed. Do IF howoldareyou='4' Compute weightage=0/3.
This is the Syntax........
DATASET ACTIVATE DataSet3. COMPUTE weightage=15/8. Do IF howoldareyou='1' COMPUTE weightage=26/19. Do IF howoldareyou='2' COMPUTE weightage=32/40. Do IF howoldareyou='3' COMPUTE weightage=26/31. Do IF howoldareyou='4' Compute weightage=0/3. Do IF howoldareyou='5' End If. EXECUTE
.
Thanks.........
Ismail K. Noor, Ph.D.,
[hidden email]
http://www.dennonoor.com
(313) 690-0755 (cell) |