Date: Tue, 1 Jul 2008 10:25:55 -0700
Reply-To: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject: Re: Update info in data set based on other data set
In-Reply-To: <200807011327.m61AkI24002955@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Is this close to what you want?
Sort A by id and date
Sort B by id and date
DATA C
Read A observation
WHILE B.id < A.id OR
(B.id = A.id AND B.date <= A.date)
Read B observation
END
varx = (A.date = B.date AND A.id = B.id)
RUN
-----Original Message-----
From: Jan Sunde [mailto:snip]
Sent: Tuesday, July 01, 2008 6:27 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Update info in data set based on other data set
Hi
I have a problem as follows :
I want to create a dataset C that copies all of data set A as well as
adds an additional variable (varx) as 0/1 based on whether an
observation id in dataset A occurs in dataset B (on the same date).
|