|Date: ||Fri, 5 Oct 2007 09:00:08 -0400|
|Reply-To: ||"Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>|
|Subject: ||Re: Compare the values of same dataset generated at different
On Wed, 3 Oct 2007 16:22:58 -0400, Priya Swamiappan <swppriya@GMAIL.COM> wrote:
>I need to compare the same dataset generated at twno different dates(the
>order of the records of one or more fields is not equal to that in other
>I used proc compare for this.
> proc compare data=trData compare=refData OUT=all outnoequal listvar
>trdata - same as refdata but generated at different date with some
>Can someone confirm me whether this code gives out the exact difference if
>any. Or can you suggest me any other means of comparing.
>Thanks in advance.
The appropriate PROC COMPARE code depends on the circumstances: what you
expect or require. That's where there are so many options.
If you know that the observation ordering is different, there is not much
point in doing a comparison which ignores that. You will just see a lot of
apparent differences which are realy just consequences of the difference in
ordering. Instead, sort first to eliminate ordering differences.
If you know or discover that there are non-corresponding observations, you
probably want to introduce a BY statement to isolate the non-corresponding