No, some of them are still the old style SH[6 or 8 digits leading 0 filled, or 7 digits no leading 0] . Let me see if I can explain it in English even though I loathe Cobol. The following reflects code changes that I haven't yet posted A leading EP will be removed. If the seriesId is 10 characters long and begins with SH00, that will be removed. If it doesn't begin with either of those, it will be taken as is. Blast it, just realized this won't handle the case of them changing one that is SH followed by 7 digits by adding a loading 0. I'll just have to get to the numeric part and recreate it. If what remains is numeric, that is when the limits come in. If the value is <= the upper limit, leading zeros will be removed. If the value is also < 1000000(note 1), it will be leading zero filled to 6 digits. We now have a string that is 6,7, or 8 digits long. An SH will be added to the beginning of this string. I am assuming that if the ID in theTVDB is not of the form EPn, SHn(note 2) or n, it is correct or uncorrectable. Although maybe I need to revisit the code and not remove the EP or SH if the remainder is not numeric, but theoretically that shouldn't happen. I am also assuming that if the numeric portion has a value greater than the upper limit, it will have a leading 0 if there is supposed to be one. My reading of the discussion at theTVDB forum is that they are looking at 3 options: Leaving things as they are now, going back to the SH form or going to a strictly numeric form. I think my code will handle any of those or a mixture, even if they return to the SH form but leading zero fill it to 8 digits. note 1. I had error in the code that I have corrected. note 2. Logic error. Some IDs that begin SH0 may not be correct. Corrected code in next post.