Procedure features: |
PROC COMPARE statement option
|
VAR statement |
WITH statement |
|
Data sets: |
|
This example compares
a variable from the base data set with a variable
in the comparison data set. All summary reports are suppressed.
|
libname proclib 'SAS-library'; |
|
options nodate pageno=1 linesize=80 pagesize=40; |
|
proc compare base=proclib.one compare=proclib.two nosummary; |
|
var gr1;
with gr2;
title 'Comparison of Variables in Different Data Sets';
run; |
Comparison of Variables in Different Data Sets 1
COMPARE Procedure
Comparison of PROCLIB.ONE with PROCLIB.TWO
(Method=EXACT)
NOTE: Data set PROCLIB.TWO contains 1 observations not in PROCLIB.ONE.
NOTE: Values of the following 1 variables compare unequal: gr1^=gr2
Value Comparison Results for Variables
__________________________________________________________
|| Base Compare
Obs || gr1 gr2 Diff. % Diff
________ || _________ _________ _________ _________
||
1 || 85.0 87.0000 2.0000 2.3529
3 || 78.0 73.0000 -5.0000 -6.4103
4 || 87.0 74.0000 -13.0000 -14.9425
__________________________________________________________
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.