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 (November 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 30 Nov 2011 10:56:12 -0800
Reply-To:   David Marso <david.marso@gmail.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   David Marso <david.marso@gmail.com>
Subject:   Re: Error : The first word in the line is not recognized as an SPSS Statistics command.
In-Reply-To:   <1322675212543-5036280.post@n5.nabble.com>
Content-Type:   text/plain; charset=us-ascii

Line 3: "!COMPUTE " Nix the ! .

anitha.un wrote > > Hi All, > > I have a requirement where i need to create variables with the pattern > like Var1Sub1, Var1Sub2,Var1Sub4 , Var1Sub8, Var2Sub1, Var2Sub2, Var2Sub4 > , Var2Sub8, Var3Sub1,Var3Sub2, Var3Sub4,Var3Sub8, Var3Sub9. > > Below is the code i wrote : > > DEFINE !myvar (nb_loop= !TOKENS(5)). > !DO !cnt=1 !TO !nb_loop > !COMPUTE !CONCAT(variable,!cnt)=!cnt. > COMPUTE !CONCAT(sub,1)=!sub1. > COMPUTE !CONCAT(!cnt,!sub1)=!var1. > COMPUTE !CONCAT(sub,2)=!sub2. > COMPUTE !CONCAT(!cnt,!sub2)=!var2. > COMPUTE !CONCAT(sub,4)=!sub4. > COMPUTE !CONCAT(!cnt,!sub4)=!var4. > COMPUTE !CONCAT(sub,8)=!sub8. > COMPUTE !CONCAT(!cnt,!sub8)=!var8. > COMPUTE !CONCAT(sub,9)=!sub9. > COMPUTE !CONCAT(!cnt,!sub9)=!var9. > !DOEND > EXECUTE. > !ENDDEFINE. > > SET MPRINT ON. > !myvar nb_loop=var1 var2 var4 var8 var9. > > I am getting an error : The first word in the line is not recognized as an > SPSS Statistics command. > Also i tried removing " . " in the define part, but it did not work. >

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Error-The-first-word-in-the-line-is-not-recognized-as-an-SPSS-Statistics-command-tp5036280p5036453.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

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