By default, the names
for SAS tables and columns must follow these rules:
-
Blanks cannot appear in SAS names.
-
The first character must be a letter
(such as A through Z) or an underscore (_).
-
Subsequent characters can be letters,
numeric digits (such as 0 through 9), or underscores.
-
You can use uppercase or lowercase
letters. SAS processes names as uppercase, regardless of how you enter
them.
-
Special characters are not allowed,
except for the underscore. In filerefs, you can use only the dollar
sign ($), number sign (#), and at sign (@).
The following SAS language
elements have a maximum length of eight characters:
-
-
SAS engine names and passwords
-
names of SAS/ACCESS access descriptors
and view descriptors (to maintain compatibility with SAS 6 names)
-
variable names in SAS/ACCESS access
descriptors and view descriptors
Beginning in SAS 7 software,
SAS naming conventions have been enhanced to allow longer names for
SAS data sets and SAS variables. The conventions also allow case-sensitive
or mixed case names for SAS data sets and variables.
The following SAS language
elements can now be up to 32 characters in length:
-
members of SAS libraries, including
SAS data sets, data views, catalogs, catalog entries, and indexes
-
variables in a SAS data set macros
and macro variables
See the topic "Names in the SAS Language"
in SAS Language Reference: Concepts for a complete
description of the rules for SAS names.