Hi, I have multiple variables that I want to join together using the catx function. However, this code is placed within a larger program where the number of start variables is likely to grow over time so I would like to automate it. The current code is: proc sql; create table new_table as select *, catx(" : ",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) as list from old_table ; quit; I'd like to automate this to something equivalent to: proc sql; create table new_table as select *, do i = 1 to &maxcount; catx(" : ",a&i) as list end; from old_table ; quit; Where &maxcount is an already created macro variable containing the correct number of varibales present in the dataset. However, everything I've tried doesn't seem to have the desired effect. Any help would be much appreciated.
... View more