Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

spss syntax error 4024 help!

1,146 views
Skip to first unread message

Aga

unread,
Jul 19, 2017, 3:30:57 PM7/19/17
to
Hi, I am trying to use the syntax but still getting this error, what is what is wrong with it? Any help? I'll be very grateful!

Error # 4024 in column 26. Text: ,
The sequence of operators found is invalid. Check the expression for omitted
or extra operands, operators, and parentheses.
Execution of this command stops.
EXECUTE.

COMPUTE super_variable=(.02407*SQ_FOODSELECT_M06) + (.00171*SQ_EATDURE_M06).
EXECUTE.

Bruce Weaver

unread,
Jul 19, 2017, 6:15:29 PM7/19/17
to
I could not see anything obviously wrong, so generated my own small data set and tried your COMPUTE command. It worked. See below:

NEW FILE.
DATASET CLOSE ALL.
DATA LIST LIST / SQ_FOODSELECT_M06 SQ_EATDURE_M06 .
BEGIN DATA
1 2
3 4
5 6
END DATA.

COMPUTE super_variable=(.02407*SQ_FOODSELECT_M06) + (.00171*SQ_EATDURE_M06).
LIST.

OUTPUT:

SQ_FOODSELECT_M06 SQ_EATDURE_M06 super_variable

1.00 2.00 .03
3.00 4.00 .08
5.00 6.00 .13

Number of cases read: 3 Number of cases listed: 3

This suggests to me that there might be something funny going on in your dataset. Do you have string variables where you should have numeric variables, for example?

HTH.

Rich Ulrich

unread,
Jul 20, 2017, 12:34:13 AM7/20/17
to
On Wed, 19 Jul 2017 12:30:54 -0700 (PDT), Aga <agawr...@gmail.com>
wrote:
Since it runs for Bruce,
I believe that you re-typed the command instead of using copy/paste.

The error message says "sequence of operators" and text ,

- As I count it, the decimal in .02407 is in column 26.
Change the comma to a period.

--
Rich Ulrich

Bruce Weaver

unread,
Jul 20, 2017, 9:59:03 AM7/20/17
to
Well spotted Rich. I think you're right.
0 new messages