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.

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