Re: Corrupt MARC records

2005-05-11 Thread Colin Campbell
Ron Davies wrote: Has anybody ever seen a MARC record where the order of the field data wasn't the same as that of the entries in the directory? I'm not questioning the logic of reading a record using the field lengths and offsets, just wondering if anybody had ever seen this occur in the wild.

RE: Corrupt MARC records

2005-05-11 Thread Ron Davies
At 16:58 7/05/2005, Andrew Houghton wrote: The code is off the top of my head and parts have been copied from a variety of Perl scripts I had hanging around. It isn't tested, but hopefully a start for your work. Thanks, Andy, there's a lot there that I can put to good use. Much more elegant cod

RE: Corrupt MARC records

2005-05-07 Thread Houghton,Andrew
erl.org Subject: Re: Corrupt MARC records > I wondered if any of you had run into similar problems, or if you had > any thoughts on how to tackle this particular issue. It's ironic that MARC::Record *used* to do what Andrew suggests: using split() rather than than substr() with the act

Re: Corrupt MARC records

2005-05-07 Thread Ed Summers
I wondered if any of you had run into similar problems, or if you had any thoughts on how to tackle this particular issue. It's ironic that MARC::Record *used* to do what Andrew suggests: using split() rather than than substr() with the actual directory lengths. The reason for the switch was jus

RE: Corrupt MARC records

2005-05-07 Thread Houghton,Andrew
e top of my head and not tested, didn't I? It's still not test, but the above mistakes were obvious after reading what I sent... Andy. -Original Message- From: Houghton,Andrew [mailto:[EMAIL PROTECTED] Sent: Saturday, May 07, 2005 10:58 AM To: perl4lib@perl.org Subject: RE: Cor

RE: Corrupt MARC records

2005-05-07 Thread Houghton,Andrew
MARC records contain a field delimiter after each field and a record delimiter at the end. Assuming that those delimiters are still in your MARC records and that the directory entries are in the same order as the fields, then you can do the following: 1 Set Perl's record delimiter to the MAR