Jozsef,
Quick thought: why not run a query to pick up all the fields with relationships, write them to a text file and then use the -F switch on the im editissue to read the values to act on from your text file. This is how I quickly batch things like this.