I don't know about SAS/OR but if you can create a dataset of pairs you can do this in base SAS
data pair;
input pair $;
datalines;
01-02
01-03
02-03
04-05
04-06
05-06
;
run;
data new(drop=pair1 pair2);
set pair;
retain unique pair1 pair2;
if _n_=1 then do; unique=1; pair1=scan(pair,1,"-"); pair2=scan(pair,2,"-"); end;
else if indexw(translate(pair," ","-"),pair1)<=0 and indexw(translate(pair," ","-"),pair2)<=0 then do; unique=unique+1; pair1=scan(pair,1,"-"); pair2=scan(pair,2,"-"); end;
run;
... View more