Hello, I see the code to be fine, may be that while the New dataset is being read into a dataset the missing fields are not considered in the expected way.I would suggest to use MISSOVER option in the infile and then try the code .It must do your job. Example: Data New; infile datalines missover; input Location_id Area$ Phone; datalines; 1234 2345 1233 5543 ; run; Data Old; Input Location_id Area$ Phone; Datalines; 1234 NYC 55555 2345 ABC 77777 ; run; proc sort data=New nodupkey; by Location_id; Run; proc sort data=Old nodupkey; by location_id; Run; data New1; merge New(in=a) OLD(in=b); by location_id; if a; run; Thanks, GP
... View more