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 (February 1998, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 25 Feb 1998 16:51:15 GMT
Reply-To:   jrentsch@capita.com
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   jrentsch@CAPITA.COM
Organization:   AT&T WorldNet Services
Subject:   HELP: Merge bug?

This seems like a bug to me, but maybe I just don't understand why this works the way it does... Here is a simple example:

data x; a=1; b=1; output; a=1; b=3; output; a=1; b=1; output; run;

data y; a=1; c=3; output; run;

data z; merge x y; by a; if b eq 3 then c=99; run;

proc print; run;

Here is the output:

OBS A B C 1 1 1 3 2 1 3 99 3 1 1 99

Now why does observation 3 have C=99 ?? Shouldn't it be 3? If this is not a bug, I can't see why anyone would want it to work this way.

Interestingly, if I change the last assignment line in the "data x" step to: a=2; b=1; output; then the variables are handled correctly (to my way of thinking).

I am using Unix SAS 6.12.

Thanks for any help!


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