/***************************************************************************************************************** SAS file name: Data_Identical.sas File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to check if two SAS data sets are identical using PROC COMPARE Author: Peter Clemmensen Creation Date: 18/11/2017 This program supports the example page "Check If Two Data Sets Ate Identical" on SASnrd.com *****************************************************************************************************************/ /* Move data set for comparing */ proc copy in=sashelp out=work memtype=data; select class; run; /* Compare sashelp.class and work.class */ proc compare base=sashelp.class compare=work.class; run; /* Check value of &SYSINFO macro variable */ data _null_; if &sysinfo.=0 then put "The two data sets are identical"; else put "The two data sets are not identical"; run; /* Add different label to work.class; */ proc datasets lib=work; modify class; label height="Students Heigtht"; run;quit; /* Compare them again */ proc compare base=sashelp.class compare=work.class; run; /* Check &SYSINFO value */ %put &sysinfo.;