Unfortunately, none of the proposed solutions worked for my data (possibly because I did not give enough details). However, all the suggestions were helpful. After some thinking, I solved the problem as follows. Thanks to all for your help. data want1; set have; array b (30) l1m l1md l1mm l2m l2md l2mm lc lcd lcm li lid lim lp lpd lpm u1m u1md u1mm u2m u2md u2mm uc ucd ucm ui uid uim up upd upm; array c (30) c1-c30; do i=1 to dim(b); c(i)=input(b[i], $2.); end; drop b: i; run; data want2; set want1; array b (30) l1m l1md l1mm l2m l2md l2mm lc lcd lcm li lid lim lp lpd lpm u1m u1md u1mm u2m u2md u2mm uc ucd ucm ui uid uim up upd upm; array c (30) c1-c30; do i=1 to dim(b); b(i)=c[i]; end; drop c: i; run;
... View more