Table 7.7 By Function
Function Affects Groups Works At
%STR A, C* Macro compilation
%NRSTR A, B, C* Macro compilation
%BQUOTE A, C Macro execution
%NRBQUOTE A, B, C Macro execution
%SUPERQ A, B, C Macro execution (prevents
resolution)
%QUOTE A, C* Macro execution. Requires
unmatched quotation marks
and parentheses to be marked
with a percent sign (%).
%NRQUOTE A, B, C* Macro execution. Requires
unmatched quotation marks
and parentheses to be marked
with a percent sign (%).
*Unmatched quotation marks and parentheses must be marked with a percent sign (%) when
used with %STR, %NRSTR, %QUOTE, and %NRQUOTE.
Unquoting Text
Restoring the Significance of Symbols
To unquote a value means to restore the significance of symbols in an item that was
previously masked by a macro quoting function.
Usually, after an item has been masked by a macro quoting function, it retains its special
status until one of the following occurs:
• You enclose the item with the %UNQUOTE function. (For more information, see
“%UNQUOTE Function” on page 292.)
• The item leaves the word scanner and is passed to the DATA step compiler, SAS
procedures, SAS macro facility, or other parts of the SAS System.
• The item is returned as an unquoted result by the %SCAN, %SUBSTR, or
%UPCASE function. (To retain a value's masked status during one of these
operations, use the %QSCAN, %QSUBSTR, or %QUPCASE function. For more
information, see “Other Functions That Perform Macro Quoting” on page 100.)
As a rule, you do not need to unquote an item because it is automatically unquoted when
the item is passed from the word scanner to the rest of SAS. Under two circumstances,
however, you might need to use the %UNQUOTE function to restore the original
significance to a masked item:
Unquoting Text 97