Date: Tue, 20 May 2008 10:44:59 -0400
Reply-To: Art@DrKendall.org
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Art@DrKendall.org>
Organization: Social Research Consultants
Subject: Re: sel if not working
In-Reply-To: <4832CBE1.6000803@free.fr>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
That is *very surprising*. I don't have an answer as to why this is
happening.
To help in debugging your situation
1) check the length of the string in the variable.
2) open a new instance of SPSS. Cut, paste, and run the syntax below the
sig block. See why the checks are different.
3) try to create a small set of syntax similar to that below which does
not create a check flag that you would expect.
Art Kendall
Social Research Consultants
data list list/ country (a4).
begin data
FR
FR.
"FR. "
" FR."
fr.
"fr."
fr
ab
AB
CD.
cD.
END DATA.
COMPUTE CHECK1 = COUNTRY EQ "FR.".
COMPUTE CHECK2 = upcase(COUNTRY) EQ "FR.".
COMPUTE CHECK3 = INDEX(COUNTRY,"FR.").
COMPUTE CHECK4 = INDEX(COUNTRY,"FR").
COMPUTE CHECK5 = INDEX(COUNTRY,"fr.").
LIST.
Frank Thomas wrote:
> I try to select a country within a large multi-country file, the
> European Social Survey. The SELECT IF command doesn't work, to my
> surprise. the new outfile when reopened still shows the complete data
> set.
>
> Does Select of not work with alphanumeric variables ?
>
> Here is my syntax :
>
> GET FILE='xx.sav'.
> sel if cntry = "FR".
> freq cntry.
> save outFILE='xxFR.sav'.
>
>
> --
> ..........................................
> Dr. Frank Thomas
> FTR Internet Research
> 93110 Rosny-sous-Bois
> France
>
> =====================
> 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
|