BookmarkSubscribeRSS Feed
frisco
Calcite | Level 5
Chris, I just read your blog entry on nerds and you mentioned that a hypothetical holiday greeting card might say %let peace='on Earth';
Of course, I can't help asking, why the quotes?
4 REPLIES 4
Doc_Duke
Rhodochrosite | Level 12
A nerd's holiday card must be syntactically correct. In SAS, text constants are enclosed in quotes.....
LinusH
Tourmaline | Level 20
Syntactically, text constants assigned to a macro variable doesn't have to be enclosed in quotes. It's more a question of how you will use the macro variable later on...

/Linus
Data never sleeps
ChrisHemedinger
Community Manager
Actually, Cynthia Z suggested a true geek might write:

[pre]
options symbolgen;
%let what = peace;
%let where = &&&what;
%let how = And let it begin with me.;

%put Let there be &what &where.. &how;
[/pre]
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
Cynthia_sas
SAS Super FREQ
Of, course, the code assumes that
[pre]
%let peace = on Earth;
[/pre]

has already been entered into the Global System Table with a %LET statement.

cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1103 views
  • 0 likes
  • 5 in conversation