Do you know what's missing or otherwise wrong with the file?
Suppose it just misses a closing tag at the end, then it's easy: just add the missing part (by using CONCAT in DB2):
Code:
UPDATE my_table SET my_col = my_col || '</my_tag>' WHERE .....
Otherwise it would take some (Java or perl or so) programming effort to extract just the tags, then edit that to see where it goes wrong, then write an other program to insert the missing pieces.
Possible perl script to do the first part above:
Code:
#! perl -0p
s/>.*?</>\n</gs;
Or of course, consider using the new (v9) xml datatype -- then you'll never be able to store non-wellformed XML in DB2!