Hi,
I created a syntax in spss 18 and it runs without any problems from within spss. However, when I run the same syntax using python 2.6.5 inside netbeans 6.8, I run into problems. Here is the situation: Within spss, when I run: DO IF (DT_EVENT_first NE DT_EVENT_last). COMPUTE CONTACTOK = 1. END IF. EXECUTE. I have no problems and get the expected result. But when I use python, I get the following message: >Warning # 142. Command name: COMPUTE >LOOP has no effect on this command. >Error # 1. Command name: COMPUTE >The first word in the line is not recognized as a PASW Statistics command. >Execution of this command stops. Any ideas why I may be running into this problem? My OS is win 7 32 bit. Thanks for your help, Patricio ===================== 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 |
Offhand, I'd guess that it may be running
with batch syntax rules, although I thought the Python plug-in used interactive
rules. Try removing the indentation from the COMPUTE command.
From: Patricio Calderon <[hidden email]> To: [hidden email] Date: 07/26/2011 03:10 PM Subject: problems between spss18 syntax and python's netbeans 6.8 Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi, I created a syntax in spss 18 and it runs without any problems from within spss. However, when I run the same syntax using python 2.6.5 inside netbeans 6.8, I run into problems. Here is the situation: Within spss, when I run: DO IF (DT_EVENT_first NE DT_EVENT_last). COMPUTE CONTACTOK = 1. END IF. EXECUTE. I have no problems and get the expected result. But when I use python, I get the following message: >Warning # 142. Command name: COMPUTE >LOOP has no effect on this command. >Error # 1. Command name: COMPUTE >The first word in the line is not recognized as a PASW Statistics command. >Execution of this command stops. Any ideas why I may be running into this problem? My OS is win 7 32 bit. Thanks for your help, Patricio ===================== 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 |
Administrator
|
Well-spotted, Rick!
Patricio, if you want CONTACTOK = 1 when the condition is met, and equal to 0 otherwise, then you could do this instead of your current DO-IF: COMPUTE CONTACTOK = (DT_EVENT_first NE DT_EVENT_last). HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
In reply to this post by Rick Oliver-3
The plugin does use interactive syntax
rules, so the indent should make no difference. I wonder, though,
whether there are some nonblank white space characters or line ending characters
that are messing this up. And I don't what might be happening in
the netbeans layer.
Jon Peck Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: Rick Oliver/Chicago/IBM@IBMUS To: [hidden email] Date: 07/26/2011 02:35 PM Subject: Re: [SPSSX-L] problems between spss18 syntax and python's netbeans 6.8 Sent by: "SPSSX(r) Discussion" <[hidden email]> Offhand, I'd guess that it may be running with batch syntax rules, although I thought the Python plug-in used interactive rules. Try removing the indentation from the COMPUTE command. From: Patricio Calderon <[hidden email]> To: [hidden email] Date: 07/26/2011 03:10 PM Subject: problems between spss18 syntax and python's netbeans 6.8 Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi, I created a syntax in spss 18 and it runs without any problems from within spss. However, when I run the same syntax using python 2.6.5 inside netbeans 6.8, I run into problems. Here is the situation: Within spss, when I run: DO IF (DT_EVENT_first NE DT_EVENT_last). COMPUTE CONTACTOK = 1. END IF. EXECUTE. I have no problems and get the expected result. But when I use python, I get the following message: >Warning # 142. Command name: COMPUTE >LOOP has no effect on this command. >Error # 1. Command name: COMPUTE >The first word in the line is not recognized as a PASW Statistics command. >Execution of this command stops. Any ideas why I may be running into this problem? My OS is win 7 32 bit. Thanks for your help, Patricio ===================== 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 |
In reply to this post by Patricio Calderon-2
Thanks Rick, that worked out perfectly.
On Tue, 26 Jul 2011 15:32:34 -0500, Rick Oliver <[hidden email]> wrote: >Offhand, I'd guess that it may be running with batch syntax rules, >although I thought the Python plug-in used interactive rules. Try removing >the indentation from the COMPUTE command. > > > >From: Patricio Calderon <[hidden email]> >To: [hidden email] >Date: 07/26/2011 03:10 PM >Subject: problems between spss18 syntax and python's netbeans 6.8 >Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > >Hi, >I created a syntax in spss 18 and it runs without any problems from within >spss. However, when I run the same syntax using python 2.6.5 inside >netbeans 6.8, I run into problems. Here is the situation: > >Within spss, when I run: > >DO IF (DT_EVENT_first NE DT_EVENT_last). > COMPUTE CONTACTOK = 1. >END IF. >EXECUTE. > >I have no problems and get the expected result. But when I use python, I >get the following message: > >>Warning # 142. Command name: COMPUTE >>LOOP has no effect on this command. > >>Error # 1. Command name: COMPUTE >>The first word in the line is not recognized as a PASW Statistics >command. >>Execution of this command stops. > >Any ideas why I may be running into this problem? > >My OS is win 7 32 bit. > >Thanks for your help, > >Patricio > >===================== >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 |
In reply to this post by Patricio Calderon-2
Thanks Bruce, that makes sense since it's one condition.
On Tue, 26 Jul 2011 14:08:29 -0700, Bruce Weaver <[hidden email]> wrote: >Well-spotted, Rick! > >Patricio, if you want CONTACTOK = 1 when the condition is met, and equal to >0 otherwise, then you could do this instead of your current DO-IF: > >COMPUTE CONTACTOK = (DT_EVENT_first NE DT_EVENT_last). > >HTH. > > > >Rick Oliver wrote: >> >> Offhand, I'd guess that it may be running with batch syntax rules, >> although I thought the Python plug-in used interactive rules. Try removing >> the indentation from the COMPUTE command. >> >> >> >> From: Patricio Calderon <[hidden email]> >> To: [hidden email] >> Date: 07/26/2011 03:10 PM >> Subject: problems between spss18 syntax and python's netbeans 6.8 >> Sent by: "SPSSX(r) Discussion" <[hidden email]> >> >> >> >> Hi, >> I created a syntax in spss 18 and it runs without any problems from within >> spss. However, when I run the same syntax using python 2.6.5 inside >> netbeans 6.8, I run into problems. Here is the situation: >> >> Within spss, when I run: >> >> DO IF (DT_EVENT_first NE DT_EVENT_last). >> COMPUTE CONTACTOK = 1. >> END IF. >> EXECUTE. >> >> I have no problems and get the expected result. But when I use python, I >> get the following message: >> >>>Warning # 142. Command name: COMPUTE >>>LOOP has no effect on this command. >> >>>Error # 1. Command name: COMPUTE >>>The first word in the line is not recognized as a PASW Statistics >> command. >>>Execution of this command stops. >> >> Any ideas why I may be running into this problem? >> >> My OS is win 7 32 bit. >> >> Thanks for your help, >> >> Patricio >> >> ===================== >> 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 >> > > >----- >-- >Bruce Weaver >[hidden email] >http://sites.google.com/a/lakeheadu.ca/bweaver/ > >"When all else fails, RTFM." > >NOTE: My Hotmail account is not monitored regularly. >To send me an e-mail, please use the address shown above. > >-- >View this message in context: >Sent from the SPSSX Discussion mailing list archive at Nabble.com. > >===================== >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 |
In reply to this post by Patricio Calderon-2
That's interesting. As Rich suggested, I removed the indentation and the
query worked. So maybe it's an Netbeans issue? I'll try to use pythonwin and see what happens. Thanks Jon. On Tue, 26 Jul 2011 15:26:33 -0600, Jon K Peck <[hidden email]> wrote: >The plugin does use interactive syntax rules, so the indent should make no >difference. I wonder, though, whether there are some nonblank white space >characters or line ending characters that are messing this up. And I >don't what might be happening in the netbeans layer. > >Jon Peck >Senior Software Engineer, IBM >[hidden email] >new phone: 720-342-5621 > > > > >From: Rick Oliver/Chicago/IBM@IBMUS >To: [hidden email] >Date: 07/26/2011 02:35 PM >Subject: Re: [SPSSX-L] problems between spss18 syntax and python's > netbeans 6.8 >Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > >Offhand, I'd guess that it may be running with batch syntax rules, >although I thought the Python plug-in used interactive rules. Try removing >the indentation from the COMPUTE command. > > > >From: Patricio Calderon <[hidden email]> >To: [hidden email] >Date: 07/26/2011 03:10 PM >Subject: problems between spss18 syntax and python's netbeans 6.8 >Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > >Hi, >I created a syntax in spss 18 and it runs without any problems from within >spss. However, when I run the same syntax using python 2.6.5 inside >netbeans 6.8, I run into problems. Here is the situation: > >Within spss, when I run: > >DO IF (DT_EVENT_first NE DT_EVENT_last). >COMPUTE CONTACTOK = 1. >END IF. >EXECUTE. > >I have no problems and get the expected result. But when I use python, I >get the following message: > >>Warning # 142. Command name: COMPUTE >>LOOP has no effect on this command. > >>Error # 1. Command name: COMPUTE >>The first word in the line is not recognized as a PASW Statistics >command. >>Execution of this command stops. > >Any ideas why I may be running into this problem? > >My OS is win 7 32 bit. > >Thanks for your help, > >Patricio > >===================== >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 |
Might be a non-printing tab character.
From: Patricio Calderon <[hidden email]> To: [hidden email] Date: 07/27/2011 09:02 AM Subject: Re: problems between spss18 syntax and python's netbeans 6.8 Sent by: "SPSSX(r) Discussion" <[hidden email]> That's interesting. As Rich suggested, I removed the indentation and the query worked. So maybe it's an Netbeans issue? I'll try to use pythonwin and see what happens. Thanks Jon. On Tue, 26 Jul 2011 15:26:33 -0600, Jon K Peck <[hidden email]> wrote: >The plugin does use interactive syntax rules, so the indent should make no >difference. I wonder, though, whether there are some nonblank white space >characters or line ending characters that are messing this up. And I >don't what might be happening in the netbeans layer. > >Jon Peck >Senior Software Engineer, IBM >[hidden email] >new phone: 720-342-5621 > > > > >From: Rick Oliver/Chicago/IBM@IBMUS >To: [hidden email] >Date: 07/26/2011 02:35 PM >Subject: Re: [SPSSX-L] problems between spss18 syntax and python's > netbeans 6.8 >Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > >Offhand, I'd guess that it may be running with batch syntax rules, >although I thought the Python plug-in used interactive rules. Try removing >the indentation from the COMPUTE command. > > > >From: Patricio Calderon <[hidden email]> >To: [hidden email] >Date: 07/26/2011 03:10 PM >Subject: problems between spss18 syntax and python's netbeans 6.8 >Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > >Hi, >I created a syntax in spss 18 and it runs without any problems from within >spss. However, when I run the same syntax using python 2.6.5 inside >netbeans 6.8, I run into problems. Here is the situation: > >Within spss, when I run: > >DO IF (DT_EVENT_first NE DT_EVENT_last). >COMPUTE CONTACTOK = 1. >END IF. >EXECUTE. > >I have no problems and get the expected result. But when I use python, I >get the following message: > >>Warning # 142. Command name: COMPUTE >>LOOP has no effect on this command. > >>Error # 1. Command name: COMPUTE >>The first word in the line is not recognized as a PASW Statistics >command. >>Execution of this command stops. > >Any ideas why I may be running into this problem? > >My OS is win 7 32 bit. > >Thanks for your help, > >Patricio > >===================== >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 |
Free forum by Nabble | Edit this page |