SPSS Statistics 17 does not correctly parse very long compute commands either in the dialog or in pasted syntax; error 4285

Technote (troubleshooting)


Problem(Abstract)

I have SPSS Statistics 17 and I am trying to sum up a very long list of variables. I can include about 70 variables in my sum command and it will work but if I try to use a hundred or more variables then the command syntax is not parsed correctly and the result is the 4285 error:

Error # 4285 in column 256. Text: var
Incorrect variable name: either the name is more than 64 characters, or it is
not defined by a previous command.
This command not executed.

Here is how to replicate this:


I run the simple make file syntax:

INPUT PROGRAM.
LOOP id=1 to 700.
DO REPEAT a=var1 to var125.
COMPUTE a=trunc(uniform(99))+1.
END REPEAT.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
EXECUTE.


I then go into 'Utilities->Variables' and highlight all of my vars and then click the Paste button and put these vars names into a new syntax window.

I then do a Replace of the spaces and replace them with plus signs (+).

I then copy this out of the syntax windows and do a 'Transform->Compute' and make a new var and paste this long var1+vat2, etc. into the Numeric Expression box.

If you try to run this either as a additive summation or a SUM function you get the same error.

If you paste this syntax it still does not parse it correctly and you will get the same disjointed error.

Error # 4285 in column 104. Text: v
>Incorrect variable name: either the name is more than 64 characters, or it is
>not defined by a previous command.
>This command not executed.


Here is my syntax as pasted in v17 of spss:

COMPUTE new2=
var1+var2+var3+var4+var5+var6+var7+var8+var9+var10+var11+var12+var13+var14+var15+var16+var17+var18+v
ar19+var20+var21+var22+var23+var24+var25+var26+var27+var28+var29+var30+var31+var32+var33+var34+var35
+var36+var37+var38+var39+var40+var41+var42+var43+var44+var45+var46+var47+var48+var49+var50+var51+var
52+var53+var54+var55+var56+var57+var58+var59+var60+var61+var62+var63+var64+var65+var66+var67+var68+v
ar69+var70+var71+var72+var73+var74+var75+var76+var77+var78+var79+var80+var81+var82+var83+var84+var85
+var86+var87+var88+var89+var90+var91+var92+var93+var94+var100+var101+var102+var103+var104+var105+var
106+var107+var108+var109+var110+var111+var112+var113+var114+var115+var116+var117+var118+var119+var12
0+var121+var122+var123+var124+var125.
EXECUTE.

Resolving the problem

This problem has been reported to SPSS Development for resolution in the future. In the meantime, please paste the syntax then you will see that some of the variable names are broken across lines where the variable name will start at the end of one line and end on the beginning of the next line. If you edit this syntax to recombine these variables names onto one line then this syntax will run and the desired summation will be processed

Historical Number

80145

Rate this page:

(0 users)Average rating

Document information


More support for:

SPSS Statistics

Software version:

Not Applicable

Operating system(s):

Platform Independent

Reference #:

1482377

Modified date:

2009-10-05

Translate my page

Machine Translation

Content navigation