Koha How-To
Using MarcEdit to Create Koha Items
In a ticket recently, a partner and I worked together on a MARC file to get it ready for importing into Koha. One of the things we wanted to accomplish was to copy over URLs in the 856$u to the 952$u. However, weonly wanted to keep links meeting certain criteria, andeach record contained more than one 856 field!
Using MarcEdit, you can copy fields into others based on a string of text. That means that the data gets copied *only* if the pattern you entered is found.
To dothis,we did the following:
- double-click on the file, check the box next to Translate to UTF8, click on the Execute button, then on Edit Records (once the file has processed)
- select Tools from the top bar, and Swap Field Data from the drop-down
- to follow our example:
- Original Data -> Field: 856, Subfields: u, Find: <enter your text here>
- Modified Data -> Field: 952, Subfields: u
- click on these boxes:
- Copy Source
- Add to existing/create new
- Sort Modified Field
- click on the Process button, verify your count, then click OK
From here, we added the mandatory items fields Koha needs:
- goto Edit Subfield Data in the same box
- enter
- Field: 952, Subfield: a, Replace with: <your home branch>
- click on these boxes:
- New subfield only
- Match case
- click on the Replace Text button, click Yes, view your count, and click OK
You’ll want to repeat this step2 to add your Koha holding branch in the 952$b and your item type in the 952$y.
And remember, what’s needed in these fields are codes, *not* descriptions. For example, if your Koha itype code is EBOOK and the itype description is Electronic Resources, you’d enter EBOOK.
Once you’ve made all of your changes, recompile the file by going to File in the top bar and selecting Compile File into MARC. Choose your filename, and select “UTF-8 MARC file” as the type.
Here’s a shortvideo of the steps in MarcEdit:
We welcome you to share any MarcEdit tips you may have! Enjoy!
Read more by Rocío Belén Dressler