You have gotten a lot of very good advice about replacing the pipe. However, there is a threadless union for iron pipe which uses a threaded galvanized body, two rubber compression seals and two threaded nuts to tighten the seals. Its sorta like a compression union used for copper tubing. Installed one underground on the water main at my son's house about 15 years ago and its still in service.
Don Young