IF participant = 2
(where 2 represents "no").$CASENUM
system variable, which represents the case number.COMPUTE respondent_ID = $CASENUM
.RECODE Q9_1 (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1) INTO Q9_1_reversed
.COMPUTE Q9_2_centered = Q9_2 - 4
(for a scale of 1-7).