the script will die on a record that does not have an 852h subfield. I got around this limitation by loading the product file into emacs using the CLI prompt command $emacs new1.dat. I then used the search to end of buffer in emacs toolbar. I recorded the last good record's barcode. I closed emacs and then use emacs to open the initial Marc data file. Then I searched for the barcode of the last good record. The next record will not have an 852h subfield. You will need to correct the original. Fortunately, I had only 13 bad out of 8,000+ records. Most were at the end of the file. So, for test purposes I deleted them.
michael reavey mrmrmr50@rediffmail.com