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 (March 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 16 Mar 2004 13:07:30 -0500
Reply-To:     SASbum@AOL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jimmy Greeley <SASbum@AOL.COM>
Subject:      Re: How does SAS deal with missing value of the ByVariable in
              merging
Content-Type: text/plain; charset=iso-8859-1

data one; id=1; x=2; y=3; output; id=2; x=3; y=4; output; id=.; x=5; y=6; output; id=.a; x=7; y=8; output; id=.z; x=7; y=7; output; run; data two; id=1; x=1; y=1; output; id=2; x=1; y=1; output; id=.; x=1; y=1; output; id=.a; x=1; y=1; output; id=.z; x=1; y=1; output; run; proc sort data=one; by id; run; proc sort data=two; by id; run; data new; merge one two; by id; run; proc print; run;

Obs id x y 1 . 1 1 2 A 1 1 3 Z 1 1 4 1 1 1 5 2 1 1

In a message dated 3/10/2004 2:20:18 PM Eastern Standard Time, diskin.dennis@KENDLE.COM writes:

> > Huong, > > When merging, SAS treats a missing value the same as any other value. This > is the same as if you had program logic such as IF A EQ B. The result > would be true when both are missing. This very different from the way SQL > works in most database systems where a missing (NULL) can never equal > anything. > > In other words, all the missing values in one dataset would match to all > the missings in the other. Special missings are each distinct values when > it comes to merging. > > HTH, > Dennis Diskin > > > > > > 0101 htns <htns0101@YAHOO.COM> > Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> > 03/10/2004 01:54 PM > Please respond to 0101 htns > > > To: SAS-L@LISTSERV.UGA.EDU > cc: > Subject: How does SAS deal with missing value of the ByVariable in merging > > > Dear SAS-Lers, > > Suppose I want to get all of the observations, which are in both data > sets. The by variable has some missing values in both sets. Will these > observations be in the output data set? How does SAS deal > with this > situation? Any response would be appreciated. > > Huong > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Search - Find what you're looking for faster.


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