I have following macro variable :
%let NAME= NAME=Carlotta's Kitchen LLC,Chan & Chan (USA) Inc.,Cle-Mor Market,Clint & Sons Beef Jerky,D&D Foods Inc.,D.I.M. Inc;
How can create a Name_List macro from Name macro as shown below.
Name_List = 'Carlotta's Kitchen LLC','Chan & Chan (USA) Inc.','Cle-Mor Market,Clint & Sons Beef Jerky','D&D Foods Inc.','D.I.M. Inc';
I tried as
%global NAME Name_List;
%Macro Name_LIST; %let Name_LIST =; %let count=%sysfunc(countw(%bquote(&NAME),%str(,))); %put &count; %do i=1 %to &count; %let Name_LIST =%qsysfunc(tranwrd(&Name_LIST %str(%')%scan(%bquote(&NAME),&i,%str(,))%str(%'), %str( ),%str(, ))); %end; %Mend; %Name_LIST %let Name_LIST = %superq(Name_LIST);
... View more