Date: Tue, 11 May 2004 08:49:17 -0400
Reply-To: Venky Chakravarthy <venky.chakravarthy@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Venky Chakravarthy <venky.chakravarthy@PFIZER.COM>
Subject: Re: Comparing datasets
Others have given you working solutions. In your case, going strictly by
the way you have defined your problem, the following could also work.
data a b ;
do x = 1 to 10 ;
if mod (x,2) = 1 then output b ;
output a ;
data c ;
set a b ;
by x ;
if first.x and last.x ;
You have mentioned that B is a subset of A, so it follows that any
duplicate in C comes from B. So the above should work for you as well.
On Tue, 11 May 2004 00:48:27 +0000, Laughing Beggar
>This is probably dead easy, and I'm almost embarrassed to ask ...
>I have 2 datasets, each has one variable and Dataset 'B" is a subset of
>Dataset 'A'. How do I create a new dataset containing the values in 'A'
>are not in 'B' ?
>I had a go with PROC COMPARE but.....
>"The beggar laughs in the face of the thief"
>Get Extra Storage in 10MB, 25MB, 50MB and 100MB options now! Go to