Tips for Correctly and Efficiently Comparing Two Files in SASĀ®

Aaron Brown
SC Dept. of Education


Abstract

This paper gives some tips for correctly and efficiently comparing two data files via SASĀ® programs, not just to locate if discrepancies exist but where they exist. This can be helpful if you need to compare two different versions of a file. The tips include thoughts on different methods of reading data into SAS, then code examples for the COMPARE and SQL procedure to compare the datasets.