Hi Community,
I would appreciate if someone could share her/his experience in resolving following problem;
In a given dataset there is a character variable with different values in each row (multiple rows). After transposing all records vertically, i need to concatenate all values into a single variable, separated by a comma. As variable numbers differ based on the row numbers, I'm unable to build a programming logic using loop or macro.
eg.
have:
var1 var2 var3 var4;
a b c d
need:
var1
a,b,c,d
I used macro var in summing these similar numeric variables, like ;
data need;
set have;
var1= sum(of var1-var&num);
run;
Now for character variable, trying to use concatenation, like;
data need;
set have;
var1= catx(",", var1, var&num);... but it does not cover multiple variables...
... View more