LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page