I finally have a little bit of time to come back and program ... here is the version that I came up with. I left the variables intact and separate from one another, but if you examine the results you can easily see how they can be combined. data have; input edge to from flow exposure; cards; 1 1 2 10 10 2 2 1 5 10 3 3 4 5 5 4 4 3 5 5 5 5 6 10 10 6 6 5 5 5 7 7 8 5 5 8 1 5 10 10 ; data matches; set have; rename edge=matching_edge to=from from=to flow=matching_flow exposure=matching_exposure; run; data combined; if _n_=1 then do; declare hash h (dataset: 'matches'); h.definekey('from', 'to'); h.definedata('matching_edge', 'matching_flow', 'matching_exposure'); h.definedone(); call missing (matching_edge, matching_flow, matching_exposure); end; set have; if h.check()=0 then h.find(); run; proc print; run;
... View more