%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.

Syntax

%STR( string )

Usage

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

Documentation

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