Syntax doesn't do execute command

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

carrie_83
Posts: 16
Joined: Fri Nov 18, 2011 2:05 pm

Syntax doesn't do execute command

Postby carrie_83 » Fri Jan 06, 2012 11:49 am

I have no idea what's happened or why it stopped working, but when I try to run a recode command with execute in the end, it doesn't run it! It has worked before, and now all of a sudden it doesn't.
My code is:
RECODE Q9.2 ('In the last 6 months'=5) ('In the last year'=4) ('In the last 2 years'=3) ('More than 2 years ago'=2) ('Never'=1)
INTO q92z.
EXECUTE.

Can someone please help me? I'm going crazy with this...
JonPedersen
Posts: 117
Joined: Wed May 25, 2011 7:07 am
Contact:

Re: Syntax doesn't do execute command

Postby JonPedersen » Tue Jan 10, 2012 10:33 am

Hi,
The code is fine. No problem there.
The usual reason for the behaviour you describe is that you have a comment that has not been terminated with the dot.
for example:

Code: Select all

*.
* Now some recoding.
*
RECODE Q9.2 ('In the last 6 months'=5) ('In the last year'=4) ('In the last 2 years'=3) ('More than 2 years ago'=2) ('Never'=1)
INTO q92z.
EXECUTE.
would create the problem.
hth
Jon

Who is online

Users browsing this forum: No registered users and 1 guest

cron