
Computing new variables -often as means or sums over other variables- is usually done with COMPUTE. If you want to do so for only some cases but not others, use IF instead.
Some alternatives for creating new variables in SPSS are RECODE, AUTORECODE, AGGREGATE and RANK.