MARC Batch Editor
One set of rules applied to every record of a vendor load, with each change shown.
Try before you buy.
- Free preview: the first records your rules change (up to 3), before and after; the rest of the file is counted and edited once you unlock.
- Locked until you unlock it: download and copy.
- Unlock: Premium pass, ₹799 for 30 days or ₹249 for 1 week, a one-time payment unless you choose automatic renewal. Batch runs unlock with a pass only. Unlock: Premium pass, $19.99 for 30 days or $7.99 for 1 week, a one-time payment unless you choose automatic renewal. Batch runs unlock with a pass only.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
MARC file
Rules
The rules run in order on every record. Tags: 245, 6XX for all 600s, or a list such as 650 651. Subfield codes: a, or several such as abv; * means all. A blank indicator or position can be typed as # or \.
No rules yet. Add one above, or open a rules file you saved before.
Changes
Change log
| Record | Rule | What | Tag | Before | After |
|---|
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the MARC Batch Editor
Make the same change to every record of a MARC file at once: find and replace text in chosen fields and subfields (plain text or a regular expression), add a field to every record or only where it is missing, delete fields or subfields (all of them, or those that match a text), change, copy or swap tags, set indicators, and set fixed-field positions of the leader, 006, 007 or 008. It is made for catalogers cleaning vendor loads and preparing a migration: strip a proxy prefix from 856 $u, turn local 690s into 650s, drop vendor 9XX fields, set the encoding level or the language code.
The file is read and edited in your browser: ISO 2709 (.mrc) in UTF-8 or MARC-8, MARCXML, or MarcEdit’s mnemonic .mrk text. The rules run in order, every change is shown record by record with the fields before and after, and a change log lists each field changed, added or removed. Rules can be undone and redone, and saved to a file to use on the next load.
Without a pass the result is a free preview: your rules run until they find the first records they change (up to 3), which are shown before and after. With a Premium pass every record of the file is edited and the edited file, the change log and the changed records unlock.
How to use it
- Drop the MARC file on the page (.mrc, MARCXML or .mrk), or try the sample vendor load. The line under it says how many records were read, in which format and encoding, and which could not be read.
- Choose What to do, fill in the tags, subfields and text, and press Add the rule. Add as many as you need: they run in order on every record, and each can be moved or removed; Undo takes back the last change to the list, and Remove all rules starts again.
- Read the changes: each record changed shows its fields before (struck through) and after. A rule with a mistake is marked in the list and explained.
- Choose the format to save in (the same as the file, .mrc, MARCXML or .mrk) and, for .mrc, whether to keep each record’s character set or write every record in UTF-8.
- Without a pass you see a free preview of the first records changed. With a Premium pass, Download the edited file, Download the change log (CSV) or Copy the changed records.
Examples
Find and replace · In tags 856 · Subfields u · Find http://proxy.example.edu/login?url= · Replace with (empty)
− =856 40$uhttp://proxy.example.edu/login?url=https://ebooks.example.com/1$zConnect to the e-book + =856 40$uhttps://ebooks.example.com/1$zConnect to the e-book
Change a tag · From 690 to 650 Set indicators · In 650 · New 2nd 4 · Only where 2nd is #
− =690 \\$aClassics collection. + =650 \4$aClassics collection.
Rules run in order: the second rule sees the field the first one made.
Find and replace · In 100 · Subfield a · Find ^(\w+), (\w+).*$ · Replace with $2 $1 · Regular expression
− =100 1\$aCormen, Thomas H.,$eauthor. + =100 1\$aThomas Cormen$eauthor.
Set fixed-field positions · 008 · From position 35 · Value eng · Only where it is now und
008/35-37 becomes “eng” only in the records where it was “und”.
Common uses
- Cleaning a vendor’s MARC load before importing it: removing 9XX order fields, proxy prefixes and subfields your system does not use.
- Preparing a migration: moving local tags into standard ones and setting the leader and 008 positions the new system checks.
- Fixing one mistake that runs through a whole file, such as a misspelt publisher or a wrong indicator.
- Making a set of rules once and running it on every monthly load.
How the rules read tags, subfields and blanks
A tag is three characters: 245, 6XX for every tag from 600 to 699, or a list such as 650 651 655. * means every data field (010 on); control fields (001 to 009) are named by their tag. Subfield codes are listed together: a, or abv; * or nothing means every subfield. Blanks, in indicators and in fixed-field values, can be typed as a space, # (as the MARC 21 documentation writes them) or \ (as .mrk files do). Positions of the leader and of 008 count from 0, as in the MARC 21 documentation.
What the editor keeps as it was
Records your rules do not change are written back byte for byte in an .mrc file. Leader positions that hold the record’s structure (the record length, the base address, the indicator and subfield counts and the entry map) are worked out again when a record is written and cannot be set by a rule. A MARC-8 record keeps MARC-8 unless you choose UTF-8; if a change brings in a character that MARC-8 cannot hold, that record is kept as it was and you are told, so choose UTF-8 to keep the change. Records in MARC-8 that switch to another script (Hebrew, Cyrillic, Arabic, Greek, Chinese, Japanese or Korean) are not converted: they are kept unchanged in an .mrc file and listed.
Regular expressions
With Regular expression ticked, the find text is a JavaScript regular expression with Unicode on: ^ and $ are the start and end of the subfield, (\d{4}) a group, and $1 puts the first group back in the replacement. Without it, the text is found exactly as typed, and a $ in the replacement is put in as it is. Any case finds capitals and small letters alike. Try a pattern in the Regex Tester first when it is long.
Limitations
- Very large files are edited in memory: files up to 300 MB are read, and big ones take a few seconds on a phone. Split a larger file and edit the parts.
- MARC-8 records that use the non-Latin MARC-8 scripts are kept unchanged rather than converted; convert them to UTF-8 first to edit them.
- MarcEdit character mnemonics in .mrk files (such as {acute}) are kept as written; open the .mrc file instead, or save the .mrk as UTF-8.
- The editor changes what the rules say and checks only the record structure, not the cataloguing: it does not check tags, indicators or codes against the MARC 21 lists.
- MySmartCoPilot is not affiliated with the Library of Congress or with MarcEdit.
Privacy
On this device: nothing is sent
The MARC file is read, edited and written in your browser; nothing is uploaded. Your rules stay on this page until you save them to a file.
Frequently asked questions
What do I get without a pass?
Without a pass, MARC Batch Editor shows the first records your rules change (up to 3), before and after; the rest of the file is counted and edited once you unlock. Until you unlock it, the result can’t be downloaded or copied. A Premium or Ultimate pass, a one-time payment unless you choose automatic renewal, unlocks the full result. The pricing page lists the passes and their prices.
How do I remove a proxy prefix from all 856 links?
Choose Find and replace, type 856 in tags and u in subfields, paste the prefix (for example http://proxy.example.edu/login?url=) into Find, leave Replace with empty and press Add the rule. Every record with that prefix shows its 856 before and after.
Can I undo a change?
The file you loaded is never changed: the rules make a new copy each time. Undo and Redo step through the changes to the list of rules, and removing a rule takes its changes out at once. The change log records every field changed, added or removed, with the field before and after.
Which files can it read and write?
ISO 2709 exchange files (.mrc, .marc, .dat) in UTF-8 or MARC-8, MARCXML, and MarcEdit’s mnemonic .mrk text. It saves in the same format or in any of the others; an .mrc file keeps each record’s character set unless you choose UTF-8 for all.
Does the order of the rules matter?
Yes. Each rule works on the record as the rules before it left it, so a tag changed by rule 1 is the tag rule 2 sees. Move a rule up or down with its arrows.
Can I use the same rules next month?
Save rules writes them to a small file; Open rules loads it again on the next vendor load. The rules file is yours and is saved without a pass.