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.);

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 950 views
  • 0 likes
  • 6 in conversation