Big thanks to PGstats ! found it with proc sql : proc sql; create table test (germs char(100)); quit; proc sql; insert into test (germs) values("('BORPER','BRR_SP','CHL_PN')"); quit; data _null_(keep=germs latinGerm); attrib latinGerm length=$100; set test; do i = 1 by 1; word = scan(germs,i,"'() ,'"); if missing(word) then leave; latinGerm = catx(" & ",latinGerm,cats("",put(word,&formatGerm.),"")); end; /*latinGerm = cats('(',latinGerm,')');*/ call symputx ('displayGerms',latinGerm); run; %put &displayGerms;
... View more