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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 717 views
  • 0 likes
  • 6 in conversation