I don't know what the intended usage is, but if it's to generate suitable variable names in PROC MEANS, the OUTPUT statement's AUTONAME option does this for you. jbonito wrote: Hi, I have string variable which is an input to a macro. It's a variable list that looks like so: (var1 var2 var3). I need to create another string variable that appends text to each of those variable names, for example (var1_mean var2_mean var3_mean). Seems I should be able to make a version of the following work, but not having success with the concatenating: vars=(var1 var2 var3); %let meanlist =; %let items = %sysfunc(countw(&vars)); %do i = 1 %to &items; %let word = %qscan(&vars,&i,%str( )); %let meantemp = input ("&word._Mean", 8.1); %let &meanlist = input ("&meanlist.&meantemp",8.1); %end; It's that last %let statement that's not working. SAS says the equals sign is out of order. Thanks in advance for your help. Joe
... View more