Date: Wed, 22 Dec 1999 09:12:33 +0100
Reply-To: detecsm_hellriegelg@WESTLB.DE
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject: Antwort: proc compare and list of K vars
Content-type: text/plain; charset=iso-8859-1
Hi,
I wouldn't use PROC COMPARE for that. Use PROC CONTENTS or the SASHELP.VCOLUMN
table to get the list of variables of both datasets, then merge them and use the
IN= operator to see, in which dataset the variable was.
Code (not testet):
proc sort data=sashelp.vcolumn out=dat1 nodupkey;
by name;
where libname="YOURLIB" and memname="MEMBER1";
run;
proc sort data=sashelp.vcolumn out=dat2 nodupkey;
by name;
where libname="YOURLIB" and memname="MEMBER2";
run;
data in1 in2 notin1 notin2;
merge dat1 in=in1 dat2 in=in2;
by name;
if in1 then output in1;
if in2 then output in2;
if in1 and not in2 then output notin2;
if in2 and not in1 then output notin1;
keep libname memname name;
run;
Mit freundlichen Grüßen
Gerhard Hellriegel
DeTeCSM
WestLB
Abteilung: 001-80622
Aderstr. 22
D - 40217 Düsseldorf
Tel.: +49211 826 6173
Fax: +49211 826 5393
|