dev2r-geek

Thursday, December 15, 2005

Macro String Comparisons in SAS

String comparisons inside macros in SAS are hard to make sense. The rule of thumb I follow is:
a. If you're comparing with a %if-%then, then the comparison will be made with NO QUOTES.

b. However, if you're comparing within a data step inside a macro, normal data-step comparison rules, such as using quotes for a string literal, will have to be followed.

I don't even want to get into single/double quote dilemma, especially in ODS.


 

View My Stats