Date: Mon, 21 Mar 2005 12:01:53 -0500
Reply-To: Tracy Haidar <thaida1@UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tracy Haidar <thaida1@UMBC.EDU>
Subject: PROC compare-finding true differences
I am trying to use proc compare to find differences in data sets. Example:
Data set A
Key Name Value
1 abc 123
2 def 456
3 ghi 789
4 jkl 012
Data set B
Key Name Value
2 def 456
3 ghi 98765
4 jkl 012
5 mno 234
I have sorted both data sets by key. When I use proc compare
proc compare base= DS_A compare= DS_B LISTCOMPOBS LISTBASEOBS ;
run;
It gives me (1) a list of obervations in A but not B and vice-versa, which
I want, but also (2) prints out a whole bunch of differences that are just
an artifact of obs 1 in data set A not matching obs 1 in data set B.
Which options should I use so that the only differences it prints in (2)
are true differences (i.e., in this case, the value associated with key=3)?
Thanks in advance