A is used to refer to
a variable (column of the data matrix) for all commands dealing with data in
The following rules apply when creating new variables or changing the name
of an existing variable:
- Variable names must be unique in a .
- Variable names are up to 64 characters long and can only contain letters, digits
and nonpunctuation characters (except that a period (.) is allowed.
- Spaces are not allowed in a name (traditionally - if intended - an underscore
"_" character is used instead, e.g. trust_in_media, an alternative to this might
be capitalisation: TrustInMedia)
- Upper and lowercase letters are not distinguished.
AA, aa, Aa and aA refer to the same variable. SPSS keeps case as it is entered, e.g.
- The first character must be a letter. @, #, or $ are also used, but then
for a special purpose (that is beyond this document). It is best to avoid them
unless you know exactly what you are doing).
- Some names are reserved and cannot be used as names for
variables as they are used as keywords in SPSS command syntax: these words are
BY, THRU and WITH, the logical operators AND, OR, NOT, as well as the
relational operators EQ,GE,GT, LE, LT, NE.
Please note that before version 12, variable names could not be longer than 8 characters and other restrictions applied for special characters.