Tips:Resolving a macro variable within single quotes

From sasCommunity
Jump to: navigation, search

It is well known that macro variables do not resolve within single quotes - what if you have a need to include a macro variable WITHIN single quotes? By using the escape character %str(%'), you can accomplish this. For example, let's say you have a macro variable named YADAYADA - then the syntax would be: %str(%')&YADAYADA.%str(%'). This can be especially helpful for database passwords, among other things.

....read more

....read more

Submitted By Stfogleman