String will be converted to a name literal, unless it qualifies under the
default rules for a SAS variable name. These default rules are in
effect when the SAS system option VALIDVARNAME=V7:
-
It begins with an English letter
or an underscore.
-
All subsequent characters are English
letters, underscores, or digits.
-
The length is 32 or fewer alphanumeric
characters.
String qualifies
as a SAS variable name, when all of these rules are true.
The NLITERAL function
encloses the value of
string in single or double quotation marks, based on the contents of
string.
|
|
|
enclosed in single quotation
marks
|
|
enclosed in single quotation
marks
|
more double quotation
marks than single quotation marks
|
enclosed in single quotation
marks
|
|
enclosed in double quotation
marks
|
If insufficient space
is available for the resulting n-literal, NLITERAL returns a blank
string, prints an error message, and sets _ERROR_ to 1.