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 (June 2000)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 27 Jun 2000 10:31:31 -0400
Reply-To:     Mark Casazza <casazzam@ADELPHI.EDU>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Mark Casazza <casazzam@ADELPHI.EDU>
Subject:      Re: SPSS-generated FILTER syntax works/fails
Comments: To: David Purdy <David_Purdy@CompuServe.com>
In-Reply-To:  <000401bfe03e$99f49380$3e10d3d4@wmin.ac.uk>
Content-Type: multipart/alternative;

David,

The problem isn't with the piece of syntax you posted. (You can cut and paste the syntax I'm including to watch it work.)

I'd go back and make sure that "q10" is defined as a1 and that the recode is working properly since it does work with a properly defined source variable. Keep in mind that placement and case in a string variable does matter thus ' a ' is different than 'A ' which is different than ' a'. It could be that nothing satisfies the requirements of your recode, but that going through the menus SPSS can figure out what you mean so it does what you intend.

Mark

DATA LIST LIST /Q10(A1). BEGIN DATA A B C C A A A END DATA. EXE.

RECODE q10 ('A'=1) (ELSE=0) INTO q10filt . EXECUTE . USE ALL. FILTER BY q10filt .

At 09:48 AM 2000-06-27 , David Purdy wrote: >I'm using SPSS v10 and find that some simple RECODE/FILTER code works fine >when >it's created using the Windows menus etc., but fails when the identical >code is >pasted into a syntax file and re-run ... > >RECODE > q10 > ('A'=1) (ELSE=0) INTO q10filt . >EXECUTE . >USE ALL. >FILTER BY q10filt . > > >Error # 4872 in column 11. Text: Q10FILT > >The name of the filter variable is undefined. Either the variable has not > >been defined or its name has been misspelled. > >This command not executed. > >EXECUTE . > > >Any suggestions for a possible solution would therefore be much appreciated. > >Regards, > >Dave Purdy [UK]

Mark V. Casazza Senior Research Analyst Office of Research, Assessment and Planning Adelphi University, Levermore Hall #307 Garden City, NY 11530

phone: 516.877.3231 fax: 516.877.3237 email: casazzam@adelphi.edu


[text/html]


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