Items that have
been masked by a macro quoting function, such as the value of WHOSE
in the following program, remain masked as long as the item is being
used by the macro processor. When you use the value of WHOSE later
in a macro program statement, you do not need to mask the reference
again.
/* Use %STR to mask the constant, and use a % sign to mark */
/* the unmatched single quotation mark. */
%let whose=%str(John%'s);
/* You don't need to mask the macro reference, because it was */
/* masked in the %LET statement, and remains masked. */
%put *** This coat is &whose ***;
Here is the output from
the %PUT statement that is written to the SAS log:
*** This coat is John's ***