The question might be are there are any periods that you want to keep in that field.
Perhaps:
data test;
last_name = 'stanley jr.';
last_name = compress(last_name,'.','t');
run;
which will remove all periods in the field.
Data design note: JR, SR, II, III, IV, 'the third' and such are not really part of a last name field and perhaps should be in a separate field.