My husband removed a toilet today, it was leaking sewage on the floor and into the other room. When we pulled the toilet off, we knew why. The flange came with the toilet when we pulled it off along with some of the drain pipe. Clearly the pipe has been broken for some time. The flange was almost completel degraded and is a pile of rust.

Now, the drain pipe is jagged and below floor level in some places. We are on a concrete slab. This is a basement half bath. How is this repaired? Can a flange that's inserted into the drain pipe instead of over it be purchased? I really don't know how to solve the problem without major destruction - jackhammer to the foundation. I also don't know how to repair a broken or extend a broken drain pipe that rests partially below a foundation. So, I'd love your advice on this one!! I need to extend the drain pipe or come up with some type of workaround for a broken drain pipe that is partially below the concrete surface where the flange would be attached...