Alisa, That is odd. I have tried on Linlin's sample, and my code seems to work: 226 data _null_; 227 length top3 $50; 228 do _n_=1 to 3; 229 set have ; 230 top3=catx(', ', top3, c_ID); 231 end; 232 call symputx('TOP3',top3); 233 run; NOTE: There were 5 observations read from the data set WORK.HAVE. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds SYMBOLGEN: Macro variable TOP3 resolves to a, b, c 234 235 %put &top3; a, b, c Are you sure you have applied _n_=1 to 3 loop? Or maybe let's get rid of the explixit loop and use 'retain': data _null_; length top3 $50; retain top3; set customer_sum (obs=3) ; top3=catx(', ', top3, Customer_ID); call symputx('TOP3',top3); run; I hope it works for you.
... View more