Date: Thu, 6 Apr 2000 09:50:10 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Proc Compare
This can probably be solved using either the UPDATE statement (in a DATA step) or the COALESCE function (in PROC SQL).
It's hard to say more because the question is a little vague.
Does "almost the same" refer to the *names* of the variables or merely to *values* (with names aligning exactly)?
How about the observations? Do they correspond one-to-one? What identifying variables are there, and do they uniquely
A compact but general example almost always helps.
On Wed, 5 Apr 2000 23:19:39 -0400, Sharavi Gandham
>First let me say thanks to all of you,who responded to my earlier question
>about Formats,Thanks a lot.
>Ok, that out of the way, to my next question,
>I have two datasets which have almost the same variables,i need to compare
>them and also update them with the new values which maybe in either of the
>datasets.Like for eg:
>xxx dataset yyy dataset
>If they have same values,leave it at that.
>If they have different, update with the current one.
>If it is missing ,update with nonmissing value.
>I hope i explained my problem clearly,
>I tried doing this by first sorting each datasets by a particular
>variable,and then merging them with Proc Compare but it is such a long
>one,also it doesn't update it.Also i have to change the name of all the
>variables so that they just don't override the ones already in place.
>So i hope someone has a solution to this,
>Thanks in advance.
>Looking forward for the response.