BookmarkSubscribeRSS Feed
Jaheuk
Obsidian | Level 7
dear all,
in example below...why is a not 1 within the macro??

%LET a=1;
%PUT >>>>>>>&a;

%MACRO ABC(test);
%PUT >>>>>>>&&test. ;
%MEND;

%ABC(a);


regards,
Herman
5 REPLIES 5
Paige
Quartz | Level 8
%abc(&a)
data_null__
Jade | Level 19
[pre]
%PUT >>>>>>>&&&test. ;
[/pre]
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggested reading from the SAS support website http://support.sas.com/ found using a Google advanced search (listed below).

SAS Macro Language: Reference, Macro Variables:
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a002047074.htm

Scott Barry
SBBWorks, Inc.

macro variable resolution site:sas.com
Ksharp
Super User
@data _null_; is correct. He is more understanding about Macro variable and clever than me. Learned it.
SASPhile
Quartz | Level 8
%LET a=1;
%PUT >>>>>>>&a;

%MACRO ABC(test);
%PUT >>>>>>>&&test. ;
%MEND;

%ABC(&a.);

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 1238 views
  • 0 likes
  • 6 in conversation