I never use Proc Append because I've been burned by it before. Each time
you run the program, unless you do clean up you will get different results.
I would suggest instead a second data step, more or less as shown below,
which would replace the Proc Append below:
set temp original;
Simple way to do this is to output all the single.dose records
into another temporary dataset and append it to the original dataset.
if first.dose then output;
proc append base=original data=temp;