I'm using PROC COMPARE to compare two datasets with a common record ID. I want to create a new dataset that lists all variables and contains a count of the number of records where the value is not equal. Basically the output will look like this, with a record for every variable (or at least every variable that is different in the two recordsets): Variable Records Not Equal Field 1 10 Field 2 15 The proc compare statement below comes close, but the dataset created by outstats only has 68 records (there are several hundred variables in the original dataset). proc compare base=old compare=new outstats=differences (where=(_type_ = 'NDIF')) transpose; id record_id; run; After running this, I see almost exactly what I want in the report in the results viewer but I can't figure out how to get this into a dataset. Thanks for your help, Rob
... View more