After removing the %str from the below code it will not work and my values is coming from a call symput macro variable.Kindly help me how to resolve the same. I want to use it as ----> %let string=a,123;b,321;c,456;d,789;e,888; %global string; %let string=%str(a,123;b,321;c,456;d,789;e,888); %put "&string."; options mprint mlogic symbolgen; %macro test; %let word_cnt = %eval(%sysfunc(countc("&string.",';'))+1);/* Problem in this line */ %let count= &word_cnt; %put &word_cnt.; */ %do i = 1 %to &word_cnt.; %let var&i=%sysfunc(trim(%qscan(&string.,&i,%str(';')))); /* Problem in this line...rest every thing is fine */ %put &&var&i; %end; %do j=1 %to 5; %let dataset_key&j= %scan(%quote(&&var&j),1,%str(",")); %let dataset_Name&j= %scan(%quote(&&var&j),2,%str(",")); %put &&dataset_key&j; %put &&dataset_Name&j; %end; % put &string; %mend test; %test;
... View more