Skip to content

Commit

Permalink
Update 07-manipulating-MARC-data-advanced.md
Browse files Browse the repository at this point in the history
  • Loading branch information
abigailsparling authored Oct 5, 2023
1 parent d3ccb91 commit 3accb21
Showing 1 changed file with 4 additions and 243 deletions.
247 changes: 4 additions & 243 deletions episodes/07-manipulating-MARC-data-advanced.md
Original file line number Diff line number Diff line change
@@ -1,230 +1,20 @@
---
title: Manipulating MARC data basics
title: Manipulating MARC data advanced
teaching: 20
exercises: 5
exercises: 2
---

::::::::::::::::::::::::::::::::::::::: objectives

- Explain how to add, update, and remove fields, subfields, indicators, and fixed fields
- Explain the functions RDA Helper and Select Records for Edit
- Explain the difference between save and compile
- Successfully manipulate MARC data
- Successfully save your MARC data
- Successfully compile your MARC data
- Explain RDA Helper and Select Records for Edit advanced functions

::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::: questions

- How can MARC data be manipulated?
- How can fields, subfields, and/or indicators be added, changed, or removed?
- How can the RDA Helper be used?
- How can fixed fields be manipulated?
- How can Select Records for Edit be used to manipulate a subset of your MARC file?
- What is the difference between save and compile?

::::::::::::::::::::::::::::::::::::::::::::::::::

## Manipulating MARC data

We've seen how we can manually and individually edit records in the MarcEditor, however, MarcEdit provides a number of more powerful ways to manipulate our MARC data. Fields, subfields, indicators can be added, removed, or changed. Fixed fields can be corrected. Fields and subfields specific to RDA can be added while AACR2 conventions are removed. It is possible to work with a subset of MARC data and then incorporate those changes into the original whole MARC data set. The variations sometime seem endless and give more weight to the nickname of MarcEdit, the swiss army knife of MARC data.

### Add/Delete a MARC field

To add or delete a MARC field, go to Tools in the upper menu in the MarcEditor and select Add/Delete Field. This will open a new Batch Editing Tools window. The Add/Delete Field functions are on the same menu level and you will need to select the action of either add or delete using the buttons on the right hand side.

In the top middle section of the window, there are two data entry fields: Field and Field Data. Enter the MARC field number you want to add or delete in the Field dialogue box. Then enter the indicators, subfields, and data in Field Data dialogue box. Remember to include the dollar sign to indicate a subfield.

![](fig/addDeleteField.png){alt='MarcEdit empty Add/Delete Field dialog'}
![](fig/example_addDelete.png){alt='MarcEdit completed Add/Delete Field dialog'}

To add the field, click the Add Field button and to delete any matching fields, click the Delete Field button.

For both the Add Field and Delete Field functions there are a number of different options that can be applied to control the updates.

The options to Add a Field include, if the field you are adding already exists, it can be inserted first in the list of those MARC fields or last. MARC fields can be added only if that MARC field is not already present in that record or based on the presence of other criteria found in other MARC fields. For example, a MARC field `655 \4$aElectronic books` can be added to only those records that are eBooks based on the data in the LDR or 008.

The options to Delete a Field include removing duplicates, removing MARC fields based on field position, removing MARC fields that do not match what is entered in the Field Data, or removing invalid UTF-8 MARC fields. For example, to ensure that only the field `655 \4$aElectronic books`. is present in the MARC data, the option Remove if field data does not match can be selected.

::::::::::::::::::::::::::::::::::::::: challenge

## Add and then delete a MARC field

1. Add a 655 for electronic books with first indicators blank and second indicator 4 to the MARC data.
2. Delete that 655 that you just added.

::::::::::::::: solution

## Solution

1. Go to Tools in the upper menu in the MarcEditor
2. Select Add/Delete Field (F7)
3. In the Field box enter 655, in the Field Data box enter `\4$aElectronic books`.
4. Click Add Field. You can also preview this change by clicking on the arrow on the right of Add Field and selecting Preview in the 7.5 version of MarcEdit
5. Check your MARC data. Was this MARC field added?
6. To delete this field, go back to Tools and select Add/Delete Field (F7)
7. In the Field box enter 655
8. In the Field Data box enter `\4$aElectronic books`.
9. Click on the Delete Field button. You can also preview this change by clicking on the arrow on the right side and selecting Preview in the 7.5 version of MarcEdit



:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::: callout

## Metacharacter syntax in the MarcEditor

Within the batch editing tools, MarcEdit uses the X metacharacter to represent a numeric range for selecting and editing fields. For example, if you enter 24X, that edit will act on fields 240-249; if you enter 5XX, that edit will act on fields 500-599.


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## Delete a range of MARC fields that begin with a number

1. Verify your data contains multiple 9XX fields.
2. Delete all 9XX fields.

::::::::::::::: solution

## Solution

1. Verify your file has multiple 9XX fields by using the Field Count report (Reports → Field Count), or by using Find (Edit → Find "=9" → Find All)
2. Go to Tools in the upper menu in the MarcEditor
3. Select Add/Delete Field (F7)
4. In the Field box add 9XX
5. Click on the Delete Field button. You can also preview this change by clicking on the arrow on the right side and selecting Preview in the 7.5 version of MarcEdit



:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

### Add, Delete, or Change information for a subfield in a MARC field

To edit subfield data within a given field, go to Tools and select Edit Subfield Data. A new Batch Editing Tools window will open (notice that this is the same window that opened for Add/Delete a field, you can also navigate between the MarcEdit Batch Editing Tools using the labels on the left hand side of the window). From here you can add a new subfield, delete a subfield, or replace text in a subfield. Set your desired subfield edit conditions by selecting the appropriate option(s) from the Search Options list.

To add a subfield, enter the MARC field and then the subfield. The text you would like to add in that subfield is entered in Replace With box. Select New subfield only from the Search Options below and then click Replace Text. Even though you are adding a subfield, you still click Replace Text. For adding a subfield, the information that goes in that field doesn't go in the box called Field Data, see the example below.

To delete a subfield, enter the MARC field and then the subfield. Select Delete Subfield from the Search Options and then click Remove Text.

To replace text in a subfield, enter the MARC field, the subfield, the text (or information) that needs to be changed in the Field Data box. Enter your updated text in the Replace with box. Click on Replace Text.

![](fig/editSubfield.png){alt='MarcEdit empty edit subfield dialog'}
![](fig/example_Subfield.png){alt='MarcEdit completed edit subfield dialog'}

::::::::::::::::::::::::::::::::::::::::: callout

## Ability to Preview and Special Undo

As of version 7.5, you can preview all of these changes before making them.
If you complete a batch edit that produces unexpected or undesirable results, you can perform a Special Undo by selecting Edit → Special Undo.
This will only on your most recent batch edit. If you perform an action after your batch edit, Special Undo will not undo your batch change but the action you just performed.

::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## Add and then Delete a MARC subfield

1. Change the `$5` for the MARC field 500 from FU to your own Library of Congress Organization Code. If you are unsure of your Library of Congress Organization Code, update the code to XYZ.
2. Delete that `$5` that you just changed.

::::::::::::::: solution

## Solution

1. Go to Tools in the upper menu in the MarcEditor
2. Select Edit Subfield Data (F9)
3. Add 500 in the Field box, 5 in the Subfield box, FU in the Field Data box, and your LC Organization Code in the Replace With box
4. Click on the Replace Text button.
5. Check your MARC data. Was FU changed to your LC Organization Code?
6. To delete this subfield, go back to Tools and select Edit Subfield Data (F9)
7. Enter 500 in the Field box, 5 in the Subfield box
8. Click on the Remove Text button.



:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::: callout

## Building a MARC field

Sometimes it is necessary to create a new MARC field based on the content of existing MARC fields.
This is possible using the function called, Build New Field.
![](fig/buildNewField.png){alt='Build New Field Window'}


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: checklist

## Let's build a new `035 9\$a` using the data from the 001 and static data

1. Go to Tools → Build New Field
2. In the new window, in the field box, type in `=035 9\$a(LCMarcEdit){001}`
3. Select the box to "Always add this field"
4. Click Process


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## Use the Build New Field to add a proxy to the `856$u`

1. For eResources, it is sometimes necessary to add your institution's proxy information to the url in the `856$u`. Add `https://exampleproxy.edu/login?url=` prefix to the url in the `856$u`.

::::::::::::::: solution

## Solution

1. Go to Tools → Build New Field
2. In the new window, in the field box, type in `=856 40\$uhttps://exampleproxy.edu/login?url={856$u}`
3. Select the box to "Replace Existing Field"
4. Click Process



:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

### Change one or both indicators in a MARC field

Sometimes it is necessary to change one or both indicators of a MARC field. To edit field indicators, go to Tools and select Edit Indicators. This will open a new Batch Editing Tools window. Enter the MARC field and the indicators that you would like to change. Enter the new indicators you want in the Replace With Indicators box. Here you will want to be careful of the combinations of indicators. If you leave the Indicators box blank and add indicators in the Replace With Indicators box, all the indicators for that MARC field will be changed to the indicators entered in the Replace With Indicators box.

![](fig/editIndicators.png){alt='MarcEdit empty edit indicators dialog'}
![](fig/example_editIndicators.png){alt='MarcEdit completed edit indicators dialog'}

::::::::::::::::::::::::::::::::::::::: challenge

## Change an indicator for a MARC field in your MARC data

1. Change the first indicator of the MARC field 050 to 1 for those MARC fields 050 that have a first indicator blank and a second indicator 4.

::::::::::::::: solution

## Solution

1. Go to Tools in the upper menu in the MarcEditor
2. Select Edit Indicators (F8)
3. Add `050` in the Field box, `\4` in the Indicators box, and `14` in the Replace With Indicators box. Leave the Field data box blank
4. Click on the Replace button.
5. Check your MARC data. Were the `050 \4` updated to be `050 14`?



:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down Expand Up @@ -258,35 +48,6 @@ To run the RDA Helper, go to Tools and select RDA Helper. In the window that ope

::::::::::::::::::::::::::::::::::::::::::::::::::

## Working with MARC fixed fields

Working with fixed fields can be difficult. In the MarcEditor, you can edit one fixed field using the easy editing window. If you put your cursor on that fixed field, such as an 008 or 006, then go to Edit and select Field 006 or Field 008. This will open up a window where you can edit the fixed field for that specific MARC record.

You can also batch insert an 006 or 008 into your records. To insert a fixed field go to Edit and select the appropriate Insert/Edit.

![](fig/fixedFields.png){alt='MarcEdit fixed fields editor'}

::::::::::::::::::::::::::::::::::::::::: callout

## Batch Editing Fixed Fields in Multiple MARC Records

Sometimes it is necessary to change a fixed field for all records in your MARC data.
This is possible using the Replace function and regular expressions which will be covered in Lesson 09.


::::::::::::::::::::::::::::::::::::::::::::::::::

## Saving, Compiling and Version Control

The MARC data that you manipulate in the MarcEditor is in a human and computer readable mnemonic `.mrk` file format that was broken from the original binary `.mrc` file. You will notice that the file name of the file you're working on, displayed at top of the MarcEditor, has the file extension `.mrk`. If you look at the file in your file directory, the file icon color is blue whereas the binary `.mrc` MARC file icon is purple.

### Saving
When you save in the MarcEditor, you are saving your latest changes as a `.mrk` file. Using File → Save will save edits into your current `.mrk` file, overwriting the original. To keep a copy of your original `.mrk` data, select File → Save As and choose a new file name for your edited records.

### Compiling
To save your edited records back into a MARC binary `.mrc` file (the file format typically required to load MARC records in external systems such as your ILS or LSP) use the compile feature. Select File → Compile File into MARC. Choose a new file name for your edited `.mrc` file. Using the same file name as your original `.mrc` file will overwrite the unedited file.

Records can also be compiled outside of the MarcEditor using the MarcMaker tool. To use the MarcMaker, from the Main Menu select MARC Tools. In the MARC Tools window, under Select Operation choose MarcMaker. Under Select Data to Process, in the Open box, select the `.mrk` file you'd like to compile. In the Save As box, specify the location and file name for your new `.mrc` file. Set the character encoding options as required, and then click Execute. Once compiled, you will see a message under Results specifying the number of records in the new `.mrc` file.

## Select Records to Edit

Expand Down Expand Up @@ -322,7 +83,7 @@ When saving the exported records you can choose to save the file as a new record

:::::::::::::::::::::::::::::::::::::::: keypoints

- MarcEdit can be used to edit any part of the MARC data including the Leader, fixed fields, fields, indicators, subfields and the content in those fields.
- Advanced reports and functions are available in MarcEdit to apply global and selective edits
- MarcEdit comes with an array of tools to manipulate data and validate MARC.

::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down

0 comments on commit 3accb21

Please sign in to comment.