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 (April 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 identify observations?

A compact but general example almost always helps.

On Wed, 5 Apr 2000 23:19:39 -0400, Sharavi Gandham <SHARAVI@WORLDNET.ATT.NET> wrote:

>Hello All >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 >x1....222 x1.....222 >x2....333 x2.....444 >x3....missing x3.....555 >x4....666 x4.....missing >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.


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