How about: Recode var1 (1,3,8,90,etc=8(2,4,etc=x) into var2.
Melissa
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
Eugenio Grant
Sent: Thursday, July 12, 2007 5:01 PM
To:
[hidden email]
Subject: [SPSSX-L] Simple Code with less lines is possible?
Is there a simple solution to this code.
IF (VAR1 = 1 ) VAR2 = 8.
IF (VAR1 = 3 ) VAR2 = 8.
IF (VAR1 = 8 ) VAR2 = 8.
IF (VAR1 = 90 ) VAR2 = 8.
IF (VAR1 = 1090) VAR2 = 8.
IF (VAR1 = 82) VAR2 = 8.
IF (VAR1 = 422) VAR2 = 8.
IF (VAR1 = 764) VAR2 = 8.
Something like
IF (VAR1 IN 1,2,8,90,etc) VAR2 = 8.
Regards,
PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.