Depending on how much metal is left, it may be better to weld the flange to a coupling, then either clamp or weld the coupling to the rusted pipe.
Depending on how much metal is left, it may be better to weld the flange to a coupling, then either clamp or weld the coupling to the rusted pipe.