As featured in: Data Management Solutions Using SAS Hash Table Operations: A Business Intelligence Case Study , and built from this github repository.
Chapter 11 Full Unduplication.sas
1 /* "Chapter 11 Full Unduplication.sas" from the SAS Press book
2  Data Management Solutions Using SAS Hash Table Operations:
3  A Business Intelligence Case Study
4 */
5 
6 data Games_dup ;
7  set Dw.Games ;
8  do _n_ = 1 to floor (ranuni(1) * 4) ;
9  output ;
10  end ;
11 run ;
12 
13 %let cat_length = 53 ;
14 
15 data Games_nodup (drop = _:) ;
16  if _n_ = 1 then do ;
17  dcl hash h() ;
18  h.defineKey ("_MD5") ;
19  h.defineData ("_N_") ;
20  h.defineDone () ;
21  dcl hiter ih ("h") ;
22  end ;
23  do until (LR) ;
24  set Games_dup end = LR ;
25  array NN[*] _numeric_ ;
26  array CC[*] _character_ ;
27  length _concat $ &cat_length _MD5 $ 16 ;
28  _concat = catx (":", of NN[*], of CC[*]) ;
29  _MD5 = MD5 (trim(_concat)) ;
30  if h.check() = 0 then continue ;
31  output ;
32  h.add() ;
33  end ;
34 run ;