Date: Fri, 11 Jan 2008 08:49:55 -0500
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
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).
filter by mygroup.
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)
> 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
For a list of commands to manage subscriptions, send the command