Here is some code I ran across to do matching and merging using Proc SQL. I think I snagged it from someone on the SAS Google Group.
data oldids;
infile cards;
input idfield2 matchfield;
cards;
1 100
2 200
;
data unmatched;
infile cards;
input idfield2 matchfield;
cards;
. 100
. 200
;
PROC SQL NOPRINT;
UPDATE unmatched
SET idfield2 = (SELECT idfield2
FROM oldids
WHERE unmatched.matchfield EQ oldids.matchfield);
QUIT;
View this code on my code snippet repository.