Hi. I took the script from novinosrin from HB and made a little tweaking. data want; set sample; by id var_a notsorted; length new $20; retain new; if first.id and first.var_a then do; call missing(new); new=var; end; else if first.var_a then new=catx("",new,var_a); if last.id then do; var=substr(new,1,1); output; end; run;
... View more