** A basic SAS merge is an example of deterministic linkage, using the rule that if the variables on ; ** the BY statement agree, the link is made: ; data links; merge cases(in=a) hosp(in=b); by PHIN; if a and b; run; data links; merge cases(in=a) hosp(in=b); by REGNO SEX BYR BMONTH; if a and b; run; ** It is difficult to code more sophisticated rules into a SAS program, such as the "at least three of five" ; ** approach described above. Intrepid programmers at the Centre have taken a crack at it, though;