BookmarkSubscribeRSS Feed
dwights
Fluorite | Level 6

I'm trying to append a macro variable's value to a macro list, Can someone please let me know if it's possible. TIA

 

 

%macro  BestDeveloper(table1);





proc sql;

select developer_id into :DevelopersList separated by ' ' from table1;

quit;





%let best_developer = 1125863416;



/*    Code to append macro variable best_developer's value to the macro-list DevelopersList    */                                                



/*

***********Unrelated code*********     */





%mend;

%BestDeveloper(developerTable);



1 REPLY 1
Amir
PROC Star

Do you mean something like the following:

 

proc sql noprint;
   select
      name
   into
      :name_list separated by ' '
   from
      sashelp.class
   ;
quit;

%let extra_name = ZZZ;

%let name_list = &name_list &extra_name;

%put name_list = &name_list;

 

Amir.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 4657 views
  • 3 likes
  • 2 in conversation