LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 8 Jan 2001 14:15:53 -0500
Reply-To:     kviel <kviel@GMCF.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         kviel <kviel@GMCF.ORG>
Subject:      Re: Proc Merge
Content-Type: text/plain; charset="iso-8859-1"

David,

I admit that my code was not explicit. I relied on the fact that I only had two datasets. When I merge these two datasets by accntnum, any observation that was not in file01 must have been in file02. Therefore, if I exclude observations not in file01 I accomplish Anna's task: create a dataset that contains accntnum's that appear in file02 but not in file01. The code below demonstrates my thoughts. Your point about variable names was well taken.

data a; input accntnum; cards; 1 3 5 ; run;

data b; input accntnum; cards; 2 3 4 ; run;

data c; merge a (in=in_a) b (in=in_b); by accntnum; ina=in_a; inb=in_b; *if a=0; run;

proc print data=c; run;

Obs accntnum ina inb

1 1 1 0 2 2 0 1 In file02, but not in file01 3 3 1 1 4 4 0 1 In file02, but not in file01 5 5 1 0

Kevin

Kevin Viel Georgia Medical Care Foundation 57 Executive Park South, NE suite 200 Atlanta, GA 30329-2224

------------------------ CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain proprietary, privileged or confidential information. If you are not an intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify me by reply e-mail and destroy the original transmission and its attachments without saving them in any manner. -----------------------


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