UPCASE
is the same as V7, except that variable names are uppercased, as in earlier versions of
SAS.
ANY
• The name can be up to 32 bytes in length.
• The name can contain any characters, including blanks, national characters,
special characters, and multi-byte characters. Names containing these types of
characters must be specified as name literals on page 31.
• The name can begin with any characters, including blanks, national characters,
special characters, and multi-byte characters.
• The name cannot contain any null bytes.
• Leading blanks are preserved but trailing blanks are ignored.
• The name must contain at least one character. A name with all blanks is not
permitted.
• can contain mixed-case letters. SAS stores and writes the variable name in the
same case that is used in the first reference to the variable. However, when SAS
processes a variable name, SAS internally converts it to uppercases. You cannot,
therefore, use the same variable name with a different combination of uppercase
and lowercase letters to represent different variables. For example, cat, Cat,
and
CAT all represent the same variable.
Requirement
If you use any characters other than the ones that are valid when the
VALIDVARNAME= system option is set to V7 (letters of the Latin
alphabet, numerals, or underscores), then you must express the
variable name as a name literal and you must set
VALIDVARNAME=ANY. If the name includes either the percent
sign (%) or the ampersand (&), then you must use single quotation
marks in the name literal in order to avoid interaction with the SAS
Macro Facility. See “SAS Name Literals” on page 31 and
“Avoiding Errors When Using Name Literals” on page 33.
See
“How Many Characters Can I Use When I Measure SAS Name
Lengths in Bytes?” on page 30
Examples
Variable name containing blanks expressed as a name literal:
‘% of profit’n=percent;
Variable name containing a special character expressed as a name
literal:
‘items@warehouse’n=itemnum;
CAUTION
Throughout SAS, using the name literal syntax with variable
names that exceed the 32-byte limit or have excessive embedded
quotation marks might cause unexpected results. The intent of the
VALIDVARNAME=ANY system option is to enable compatibility
with other DBMS variable (column) naming conventions, such as
allowing embedded blanks and national characters.
Rules for SAS Data Set Names, View Names, and Item Store Names
Three types of SAS members, SAS data sets, data views, and item stores, are expanded
to have more functionality. The setting of the VALIDMEMNAME= system option
determines what rules apply to the names of these members in your SAS session. The
Names in the SAS Language 27