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 (January 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 28 Jan 2007 10:40:58 -0500
Reply-To:     "data _null_;" <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_;" <datanull@GMAIL.COM>
Subject:      Re: Comparing observation in two data sets
Comments: To: Hari Koduvely <Hari.Koduvely@gmail.com>
In-Reply-To:  <1169996870.555883.231800@a34g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Without and example of your data it is difficult for me to determine exactly what is needed. Perhaps UPDATE could be useful for you. Here is a completely contrived example that may be helpful.

data work.one; set sashelp.class; if mod(_n_,2) eq 1 then age = .; if mod(_n_,3) eq 1 then weight = .; run; proc print; run; data work.two; set sashelp.class; if mod(_n_,2) eq 0 then age = .; if mod(_n_,3) eq 0 then weight = .; run; proc print; run;

data work.class; update work.one work.two; by name; run; proc print; run;

On 1/28/07, Hari Koduvely <Hari.Koduvely@gmail.com> wrote: > Dear all, > > I have two data sets with same variables. Only thing is that there are > missing observations in both the data sets which are not the same. How > do I compare the observations in both the sets, delete the > observations in one data set which are missing in the other set and > merge the two sets so that all the non-missiong observations are > aligned. > > Thanks for your suggestions. > > Regards, > Dr. Hari Koduvely >


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