36%local num word i pos out;
38%* loop over each token, searching the target
for that token ;
39%let num=%sysfunc(countc(%superq(str),%str(&indlm)));
40%
do i=1 %to %eval(&num+1);
41 %let word=%scan(%superq(str),&i,%str(&indlm));
42 %let pos=%sysfunc(indexw(&out,&word,%str(&outdlm)));
43 %
if (&pos eq 0) %then %
do;
44 %
if (&i gt 1) %then %let out=&out%str(&outdlm);