Zombse

The Zombie Stack Exchanges That Just Won't Die

View the Project on GitHub anjackson/zombse

How do I combine a folder of .MRC files into one .MRC using the command line or MARCEDIT?

I need to deliver a set of MARC files to a librarian and know that the librarian would rather receive one .MRC file with all records included rather than a zipped folder of .mrc files.

I know there is a way to bundle the records together because a colleague has done it, but I can't figure out how to do this myself.

Rachel

Comments

Answer by Jon Gorman

I can think of a couple of possible solutions, depending on how frequently you need to do it and your comfort with different tools.

First, MarcEdit is a wonderful tool for manipulating MARC files: http://people.oregonstate.edu/\~reeset/marcedit/html/index.php. The MARC Tools tab/window has options for combining/breaking MARC files. I think the MARC Join utility will do what you want.

If you're comfortable on the command-line, yaz-marcdump tool that comes with yaz from index data (http://www.indexdata.com/yaz) has several options for combining and translating MARC records.

I think that there's only a record separator at the end of a record and no file character (and the record character is always present).

Just a warning, there's some possible weirdness with some more general purpose tools like cat that are used to join files which could introduce extra new-lines. I would use one of the tools above instead of just cat.

To clarify, most versions of cat will add a newline between text files, but not binary files. So if you want, try using cat and use a hex-editor to see if extra new-lines are added. Some systems will ignore junk between MARC records, some won't.

Comments