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 (December 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 6 Dec 2001 00:18:35 +0100
Reply-To:   "Eckhardt, Michael" <Michael.Eckhardt@T-SYSTEMS.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Eckhardt, Michael" <Michael.Eckhardt@T-SYSTEMS.DE>
Subject:   AW: merge with 4 datasets and create a count variable
Comments:   To: "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>, max8ca@yahoo.com
Content-Type:   text/plain; charset="iso-8859-1"

Brillant idea, but it may be necessary to improve the code by using the SUM-Function instead of addition, as I am afraid the standard addition of missing values may deliver missing value as a result while the SUM function interpretes missing values as zero.

Mit freundlichen Grüßen Best regards

Michael Eckhardt Berater Business Intelligence T-Systems ITS GmbH GS FDL Mitte Frankfurter Str. 27

65760 Eschborn Tel. (06196) 961-530 Fax (06196) 961-517

Michael.Eckhardt@t-systems.de

-----Ursprüngliche Nachricht----- Von: Dorfman, Paul [mailto:Paul.Dorfman@BCBSFL.COM] Gesendet: Mittwoch, 5. Dezember 2001 22:57 An: SAS-L@LISTSERV.UGA.EDU Betreff: Re: merge with 4 datasets and create a count variable

Max,

Try this concept:

data ... ; merge ds1(in=ds1) ds2(in=ds2) ds3(in=ds3) ds4(in=ds4) ; by key ; count = ds1 + ds2 + ds3 + ds4 ; run ;

Kind regards, ================== Paul M. Dorfman Jacksonville, FL ==================

> -----Original Message----- > From: Max F [mailto:max8ca@YAHOO.COM] > Sent: Wednesday, December 05, 2001 4:34 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: merge with 4 datasets and create a count variable > > > Hello, > > Someone please help. > > I have a list of ids. I want to check this list agaist > four datasets. > If a given id exists in all four datasets, the new > variable COUNT is '4', > and so on. If a given id does not exist in any > dataset, COUNT is '0'. > I know how to do this using a number of data steps, > but I think there must > be a more efficient way to do this. Your help is > highly appreciated. > > Max > > __________________________________________________ > Do You Yahoo!? > Send your FREE holiday greetings online! > http://greetings.yahoo.com > >

Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.


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