1
votes

I have used proc compare to compare two datasets and have the difference details. But I just want to know whether two datasets are same or not(both content and number of rows wise). Like I have two datasets A and B. Want to just know whether they are same or not. No need of any other difference details. More like I just need to set a flag to 1, if the datasets are different or flag to zero if datasets are same. Is there a way to do it. I searched in internet, all I could see was using proc compare in various ways

Thanks in advance

1

1 Answers

1
votes

you can use the sysinfo variable:

proc compare noprint base=baseds compare=compareds;
run;

%if %eval(&sysinfo ge 8) %then %do; ...

There is a great SAS paper describing the return codes in meticulous detail, available here.