|PROC COMPARE statement options:
This example creates and prints an output data set that shows
the differences between matching observations.
In Comparing Observations with an ID Variable ,
the output does not show the differences past the 20th character. The output
data set in this example shows the full values. Further, it shows the observations
that occur in only one of the data sets.
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=120 pagesize=40;
proc sort data=proclib.emp95 out=emp95_byidnum;
proc sort data=proclib.emp96 out=emp96_byidnum;
proc compare base=emp95_byidnum compare=emp96_byidnum
out=result outnoequal outbase outcomp outdif
proc print data=result noobs;
title 'The Output Data Set RESULT';
|The differences for character variables are noted with an X or a period
(.). An X shows that the characters do not match. A period shows that the
characters do match. For numeric variables, an E means that there is no difference.
Otherwise, the numeric difference is shown. By default, the output data set
shows that two observations in the comparison data set have no matching observation
in the base data set. You do not have to use an option to make those observations
appear in the output data set.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.