From now on, @Smitha9 please provide data as working SAS data step code, as I show here. Please test your code to confirm that it actually works. What you have provided is not SAS data step code.
data have;
input ID Name $8. DOB :anydtdte.;
infile cards missover;
cards;
1 Sarah 07/29/1970
1
1 Sarah 07/29/1970
;
Here is my solution
data want;
set have;
retain name1 dob1;
if not missing(name) then name1=name;
if not missing(dob) then dob1=dob;
drop name dob;
format dob1 mmddyy10.;
run;
--
Paige Miller