Without seeing it this is just a suggestion but you could cut it off lower down and use a Durgo valve which lets it vent but stops odours escaping. Cutting the cast iron is the difficult bit but you could possibly take it down to the next joint and fit the Durgo into that. A photo would help you get a more accurate reply.