The first thing you need to decide is whether you want to keep the variables as numeric or character. Also consider if the variables are padded with leading zeros or anything else that may effect comparing the final values. Below is code I used to keep the variable NUMBER as a character when it was stored as numeric.
data temp (rename=(number2=number) drop=number);
length number2 $10;
set rev.mrc (keep = number);
number2 = put(number,z10.);
*NUMBER2 equals the numeric NUMBER with leading zeros. The original NUMBER is dropped, then NUMBER2 gets renamed to NUMBER in dataset temp.;
If you want to change the character variables to numeric, you can substitute code like this in the appropriate places:
length number2 8;
number2 = input(put(number,$10.),10.);
This converts the character to numeric.