|
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 [hidden email] (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 |
|
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 > [hidden email] (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 [hidden email] (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
Art Kendall
Social Research Consultants |
|
In reply to this post by news
Art,
In the meantime I found a workaround : autorecode the text var into a numeric variable, and it worked. Thanks for your help, - Frank Thomas 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 > [hidden email] (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 > > -- .......................................... Dr. Frank Thomas FTR Internet Research 93110 Rosny-sous-Bois France ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 |
|
Are you certain that the new dataset was not created? I believe that with the ability to open multiple datasets at once that you may be seeing the current working dataset, with the new dataset was saved as you expected, but not opened.
Try adding dataset name commands. GET FILE='xx.sav'. DATASET NAME full. sel if cntry = "FR". freq cntry. save outFILE='xxFR.sav'. Get file='xxFR.sav'. Dataset name france. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Frank Thomas Sent: Tuesday, May 20, 2008 9:56 AM To: [hidden email] Subject: Re: [SPSSX-L] sel if not working Art, In the meantime I found a workaround : autorecode the text var into a numeric variable, and it worked. Thanks for your help, - Frank Thomas 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 > [hidden email] (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 > > -- .......................................... Dr. Frank Thomas FTR Internet Research 93110 Rosny-sous-Bois France ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (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 |
| Free forum by Nabble | Edit this page |
