I have an old brass closet flange that has become completely separated from a 4" lead bend toilet drain. It appears that the old lead bend's edge was originally ball peen hammered for a friction fit and never soldered. The flange is intact. The edge of the lead bend is also intact and bent over enough to prevent removal of the flange. I guess that the old wax ring somehow made an adequate seal. I am replacing the toilet and would like to improve this situation.
What is the best way to repair this?