As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Comparing 2 SAS® Data Sets: An Alternative to Using PROC COMPARE

From sasCommunity
Revision as of 15:11, 8 December 2016 by Paulkaefer (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Kevin King

Wyeth-Ayerst/Genetics Institute

Cambridge, MA

Abstract

While PROC COMPARE is a useful tool, it can also be intimidating. There are dozens of options to be aware of and the output has several sections. If you were interested in doing a simple comparison, wouldn't it be great if there was a simple tool to do it? Well there is! This paper presents a set of two macros that will get the job done. Using a simple merge statement and the ability of the macro facility to access both base SAS and macro functions, the algorithm compares two SAS data sets and presents the differences in an organized fashion. This can be especially useful when the same data set is changing over time, such as cumulative transfers of data occurring several times during the life of a project.

Online materials