Wednesday, July 8, 2015

Compare the data structure using PROC COMPARE

PROC COMPARE is more useful than you think. It is mainly used to compare observations. And it is also a good tool to compare data structure. To compare only data structure, please exclude observation comparison using dataset option OBS=0.

Please see the code at below:
data test;
    set sashelp.class;
    drop name;
    test = 1;
run;

proc compare base=sashelp.class (obs=0) compare=test (obs=0) listvars; run;

No comments: