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);
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.
Ready to level-up your skills? Choose your own adventure.