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 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 7 Feb 2000 18:33:45 -0500
Reply-To:     Luke OBrien <LOBrien@DHCR.STATE.NY.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Luke OBrien <LOBrien@DHCR.STATE.NY.US>
Subject:      Re: Q combination of two datasets
Comments: To: schendera@NIKOCITY.DE
Content-Type: text/plain; charset=US-ASCII

Hi,

Here is one (untested) possibility ;

Proc Sort Data=A; by SID.

Proc Sort Data=B ; by SID ;

Data C ; Merge A(in=ina) B(in=inb) ; by SID ; If ina and inb ; run;

I hope that helps;

>>> "Christian F.G. Schendera" <schendera@NIKOCITY.DE> 02/05 10:55 PM >>> Datasets A and B have identical SIDs except for one case (SID=636 in dataset B, see examples below). How can I combine both datasets in such a way that SID=636 is filtered out? I think of something like data C ; set A (in=inb) B ; by SID ; if inb = 1; run; I am sorry for this newbie question. I have no books here. Best, Chris

/* A */ OBS SID JAHRPAAR BIOTOP METHOD 226 100 4 Woods L 309 134 4 Woods L 322 155 4 Woods L 328 165 4 Woods L 399 243 4 Woods L 538 302 4 Woods L 598 315 4 Woods L 703 339 4 Woods L 777 354 4 Woods L 1200 570 4 Woods L 1385 661 4 Woods L 1812 936 4 Woods L 1923 973 4 Woods L 1932 976 4 Woods L

/* B */

OBS BIRDTYPE JAHR BIOTOP METHOD SID SUMMAX1

678 Blackbird 1994 Woods L 100 1 969 Blackbird 1994 Woods L 134 6 1057 Blackbird 1994 Woods L 155 3 1126 Blackbird 1994 Woods L 165 8 1441 Blackbird 1994 Woods L 243 9 1705 Blackbird 1994 Woods L 302 1 2119 Blackbird 1994 Woods L 339 2 2265 Blackbird 1994 Woods L 354 3 2906 Blackbird 1994 Woods L 570 20 3185 Blackbird 1994 Woods L 661 2 3806 Blackbird 1994 Woods L 936 1 6175 Blackbird 1995 Woods L 134 4 6266 Blackbird 1995 Woods L 155 2 6330 Blackbird 1995 Woods L 165 8 6681 Blackbird 1995 Woods L 243 7 7165 Blackbird 1995 Woods L 302 3 7626 Blackbird 1995 Woods L 339 1 7748 Blackbird 1995 Woods L 354 2 8489 Blackbird 1995 Woods L 570 30 !!!! ----> 8655 Blackbird 1995 Woods L 636 7 <---!!!! 9006 Blackbird 1995 Woods L 661 2 10392 Blackbird 1995 Woods L 976 1


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