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 (January 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 11 Jan 2008 08:49:55 -0500
Reply-To:     Art@DrKendall.org
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Art Kendall <Arthur.Kendall@verizon.net>
Subject:      Re: select cases from part of idnum variable
Comments: To: Martin Sherman <MSherman@loyola.edu>
In-Reply-To:  <47864C0A.7E13.0074.3@loyola.edu>
Content-type: text/plain; charset=ISO-8859-1; format=flowed

compute newidnum= trunc (idnum/10000). recode newidnum(101 thru 105, 107, 114, 117,118=1)(else=0) into mygroup.

select if mygroup eq 1). OR filter by mygroup.

Art Kendall Social Research Consultants

Martin Sherman wrote: > Dear list: I have a large data set with a variable called IDNUM which has 8 digits. I want to select those cases that start with 101, 102, 103, 104, 105, 107, 114, 117, or 118. I don't care what numbers come after the first three. I check Raynald Levesque's site and could not find a syntax program for selecting cases based on the first three values of a numerical variable. Suggestions appreciated. thanks, > > > > Martin F. Sherman, Ph.D. > Professor of Psychology > Director of Masters Education: Thesis Track > Loyola College > Psychology Department > 222 B Beatty Hall > 4501 North Charles Street > Baltimore, MD 21210 > > 410 617-2417 (office) > 410 617-5341 (fax) > > msherman@loyola.edu > > ===================== > 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 > > >

===================== 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


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