O'Reilly logo

SAS Macro Language Magic by Robert Virgile

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7: Macro Quoting

7.1 Why Quoting is Necessary

7.2 Why Quoting is a Nightmare

7.3 What Quoting Really Does

7.4 Peeking Inside the Black Box of Quoting

7.5 The Final Word on Quoting

Some of life’s pleasures are bittersweet. Sometimes you have to pretend to enjoy the meal that your child prepared. Sometimes your appearance in the mirror demands that you visit the gym. And sometimes you have to learn macro language quoting. It’s always nice to learn something new, but it’s not always pleasant.

7.1 Why Quoting is Necessary

All four statements below run into trouble.

%let feature = '&trait';

The intent: The macro variable should resolve despite being in single quotes. Actually, single quotes prevent all macro activity, including macro variable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required