Specify one variable from the base data set to compare with one variable from the comparison data set. The VAR and WITH statements specify the variables to compare. This example compares GR1 from the base data set with GR2 from the comparison data set.
var gr1; with gr2; title 'Comparison of Variables in Different Data Sets'; run;