LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Sep 2011 18:09:38 -0500
Reply-To:     Rick Oliver <oliverr@us.ibm.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Rick Oliver <oliverr@us.ibm.com>
Subject:      Re: Problems looping in SPSS19
Comments: To: Alexa <alexan@UALBERTA.CA>
In-Reply-To:  <201109212255.p8LJamKO000475@waikiki.cc.uga.edu>
Content-Type: multipart/alternative;

Move the COMPUTE statement out of the DO REPEAT loop, and put it before the DO REPEAT loop.

From: Alexa <alexan@UALBERTA.CA> To: SPSSX-L@LISTSERV.UGA.EDU 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. END REPEAT. EXECUTE.

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 data.

Any suggestions?

===================== 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 SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


[text/html]


Back to: Top of message | Previous page | Main SPSSX-L page