Date: Fri, 9 Nov 2007 22:50:52 -0500
Reply-To: Steve First <sfirst@SYS-SEMINAR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Steve First <sfirst@SYS-SEMINAR.COM>
Subject: file compare utility
Hi,
I am looking for a more robust file compare routine than proc compare. What
I would like is a sas technique that works like the unix DIFF command.
I have two SAS ds, where each row may match or it may have extra rows on
either ds. There is no common key or sort order.
Example:
ds1 ds2
x x
1 1
2 3
3 4
5 5
5
4
What i would like would be something like.
x x_1
1 1
2 .
3 3
. 4
5 5
. 5
. 4
Proc compare doesnt seem to handle extra rows in either of the two files
unless there is a key (id). There is some written about the diff algorithm,
but they are mostly written in c or such, and Im a SAS guy.
Does anyone have an algorithm that can do this and be adapted to SAS?
Thanks,
Steve
|