On Mon, Mar 28, 2016 at 02:01:42PM +0000, Jiao, Dazhi wrote: > At IU we are running our OPAC using Blacklight. From time to time > there are some catalog errors that would cause errors in our custom > code to extract fields from the MARC records. For example, sometimes a > subfield may unexpectedly appear in a field, or an expected subfield > is accidentally named to another subfield. > > While we can catch these errors in our code, we’d also like to be able > to discover them and notify the catalogers before the records are > exposed in the discover layer. I wonder if anyone here has experiences > with some MARC validation tool for this purpose? Are you talking about low-level structural problems, like the record length field (Ldr/00-05) not matching the actual record length? Or high-level errors, like a 245 field without a subfield $a or an invalid country code? If it's the latter, Bryan Baldus wrote a Perl module (MARC::Lint) that looks pretty comprehensive: https://metacpan.org/release/MARC-Lint It includes a script (marclint) that you can use directly from the command line. If it's the former, I've attached a Perl script I wrote (marcdiag) that catches most low-level errors. It only has one dependency -- Getopt::Long, which is pretty standard but not part of a core Perl installation. Paul. -- Paul Hoffman <[log in to unmask]> Systems Librarian Fenway Libraries Online c/o Wentworth Institute of Technology 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number)