syntax help with complex variable "recoding"?


New Member
I am new to using syntax in spss, and am having difficulty with the following:

-I have a variable ("SES") that I would like to define by multiplying 2 other variables (out of 4 possible), but I would like to "choose" which 2 to use based on which is a larger number. I tried the following syntax, but after many little manipulations I am always getting an error message:

compute SES = ((dadeduc_SES * 3 + dadjob_SES * 5) If dadjob_SES>=momjob_SES).
compute SES = ((momeduc_SES * 3 + momjob_SES * 5) if dadjob_SES<momjob_SES).

At this point I'm wondering if I'm completely off base?

Any help would be appreciated as I'm on a bit of a time crunch, and clueless!!!


New Member
I've also tried the following:

if (dadjob_SES>=momjob_SES) SES=dadeduc_SES * 3 + dadjob_SES * 5.
if (dadjob_SES<momjob_SES) SES=momeduc_SES * 3 + momjob_SES * 5.


New Member
Here is the error message for the last post:
>Error # 4381 in column 50. Text: If
>The expression ends unexpectedly.
>Execution of this command stops.