As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

%STR macro function

From sasCommunity
Jump to: navigation, search
This is a work in progress. You can contribute to this article.

The %STR macro function is a macro language quoting function.


%STR( string )


The %STR macro function can be used to mask any characters or character strings that could be misinterpreted by the SAS compiler as part of SAS code. However, macro variables are still recognized and resolved within the enclosed character string. The %STR macro function allows special characters such as unmatched single or double quotes, parentheses, and semicolons to be included in a character string without causing syntax errors.

Also see

Further reading


  • Macro Language: Reference: %STR and %NRSTR Functions (versions: 9.2, 9.3, 9.4)