Error # 4080, syntax won't work

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

Posts: 1
Joined: Fri Sep 11, 2015 3:03 pm

Error # 4080, syntax won't work

Postby mhansen » Fri Sep 11, 2015 3:08 pm

I am trying to combine two string variables using the following syntax:
string GRAD_TERM (a10)
compute GRAD_TERM = concat(rtrim(AcadYearEnd),rtrim(GradTerm))

When I try to run it, I get this:
>Error # 4080 in column 19. Text: =
>On the STRING command, the list of variables being defined was not followed by
>the formats for those variables.
>Execution of this command stops.

I am new to SPSS and I'm not sure what this means or how to fix it. Could I get some help, please?
Posts: 1
Joined: Sat Oct 17, 2015 7:47 am

Re: Error # 4080, syntax won't work

Postby balabanas » Sat Oct 17, 2015 7:56 am

Sure, you've solved this issue already. But just in case: you missed dots at the end of both command lines (string and compute). Without dots SPSS in interactive mode of syntax will interpret next line as a continuation of the previous one. This should work:
string GRAD_TERM (a10).
compute GRAD_TERM = concat(rtrim(AcadYearEnd),rtrim(GradTerm)).

Who is online

Users browsing this forum: No registered users and 1 guest