Friday, January 23, 2009

MARC Tool

yaz-marcdump is a free tool from Index Data to manipulate MARC records. Perhaps it is just the tool you need to convert those MARC21 records encoded in MARC-8 into UTF-8.
yaz-marcdump reads MARC records from one or more files. It parses each record and supports output in line-format, ISO2709, MARCXML, MarcXchange as well as Hex output.

This utility parses records ISO2709(raw MARC) as well as XML if that is structured as MARCXML/MarcXchange....

The following command converts MARC21/USMARC in MARC-8 encoding to MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'. Both input and output records are ISO2709 encoded.

yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw

The same records may be converted to MARCXML instead in UTF-8:

yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml

No comments: