Date: Wed, 21 Sep 2011 18:09:38 -0500
Reply-To: Rick Oliver <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Rick Oliver <firstname.lastname@example.org>
Subject: Re: Problems looping in SPSS19
Move the COMPUTE statement out of the DO REPEAT loop, and put it before
the DO REPEAT loop.
From: Alexa <alexan@UALBERTA.CA>
Date: 09/21/2011 05:56 PM
Subject: Problems looping in SPSS19
Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
Hi everyone, I am having problems looping in SPSS 19.
I am trying to identify particular string values in a series of variables
and it is not working:
The following are my commands:
DO REPEAT a = ICD9X_CODE1_somb.1 TO ICD9X_CODE1_somb.3818.
COMPUTE HL_dx = 0.
IF (a = '3890') | (a = '3891') | (a = '3892') | (a = '389') | (a = '3897')
| (a = '3898') | (a = '3899') HL_dx = 1.
I receive no error messages, however, all values of HL_dx are being
returned as 0 when I know that there are values of '389' '3890'... in the
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command