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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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