Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 07-manipulating-MARC-data-advanced.md #159

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions episodes/07-manipulating-MARC-data-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
exercises: 3
---

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

Check warning on line 7 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

- Explain Edit Shortcuts, Build New Field, RDA Helper, and Select Records for Edit advanced functions

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

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

Check warning on line 13 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

- How can the Edit Shortcuts features be used to manipulate data?
- How can Build New Field be used to combine elements from existing MARC fields into a new field?
Expand All @@ -25,7 +25,7 @@
- Field Edits: You can clean smart characters or ISBD punctuation, correct mnemonic errors, generate paired ISBN-13 values, find fields missing a word, find records missing a field, find records with duplicate tags, insert a Generic LDR if it is missing, limit the number of fields, replace HTML entities, or swap a title.
- Math Functions: Convert to decimal degrees.

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

Check warning on line 28 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

## Let's use Edit Shortcuts to make the 099$a upper case

Expand All @@ -35,19 +35,20 @@

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

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

Check warning on line 38 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

## Use Find or Find All to Verify Results
You can use Find or Find All to verify that the change did what you expected on your records in the file. If a result didn't work as expected, you can select "Special Undo". This is why it is important to profile your data before doing batch edits.

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

:::::::::::::::::::::::::::::::::::::: instructor

Check warning on line 43 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

This is a good moment to review the [Profiling Your MARC data](https://librarycarpentry.org/lc-marcedit/05-profiling-your-MARC-data.html)

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

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


## Building a MARC field

Sometimes it is necessary to create a new MARC field based on the content of existing MARC fields.
Expand All @@ -56,7 +57,7 @@
![](fig/buildNewField.png){alt='Build New Field Window'}


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

Check warning on line 60 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

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

Expand All @@ -68,13 +69,13 @@

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

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

Check warning on line 72 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

## 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

Check warning on line 78 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

## Solution

Expand All @@ -87,18 +88,20 @@

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

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

Check warning on line 91 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag
## Beware the Build New Field Function
In the example above, if your 856 contains other subfields such as \$3, then these will not be retained because you are only building a new 856 that replaces the current one. To retain \$3 data, you would need to include this parameter in your function. This would look like `=856 40{856$3}\$uhttps://exampleproxy.edu/login?url={856$u}`

Also note, the build new field works on the first iteration of the field. When working in particular with the MARC field 856, if you need to build a new field using all of the MARC fields 856 in your record, you can use the syntax [x] as in {856$u[x]}. This will ensure all of the MARC fields in the records will undergo the build operation you specify.
::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::: instructor

Check warning on line 97 in episodes/07-manipulating-MARC-data-advanced.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

check for the corresponding close tag

This is a good time to re-iterate that MarcEdit has different ways to accomplish similar tasks. You can use Find All & Replace, Build New Field, or use the advanced subfield edit functions below. It's worth highlighting how these differ. In the example above, if there are records with the MARC field 856 that have a \$3 or other subfields besides \$u, then those subfields will not appear in the newly built MARC field 856. The Find All and Replace will only work on finding and replacing exactly what you entered in the Find All field. This is why it's important to profile data or use the Find All to review changes. For the Build New Field function, it is worth selecting the option to always create a new field and then check that new field to see if the build did what was expected. If it did, then you can use "Special Undo", and build the new field again with the option to "Replace Existing Field".

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

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


## Advanced Subfield Edit Functions
There are 3 advanced Edit Subfield features that are extremely useful. These are append, prepend, and change subfield. These aren't regular expressions but special characters built into the MarcEditor Edit Subfield tool.
Expand Down Expand Up @@ -155,12 +158,6 @@

Before using the Select Records for Edit function, save your file (Ctrl + S) to capture recent edits.

:::::::::::::::::::::::::::::::::::::: instructor

Note: For this functionality, a good demo is to update the display field to 338$a and look for "online resource".

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

Go to File and click on Select Records for Edit. In the window, you will see Display Field in the lower right hand corner. This is where you enter the MARC field you want to see displayed once you import your file. You can enter a MARC field and subfield or just a MARC field. The MARC field and/or subfield that you add in this box will provide the criteria you need to select records you want to edit. Once you have entered the Display Field, click on Import File. This will import the MARC (`.mrk`) file that you are currently working on. You can select another MARC (`.mrk`) file in the box Source MARC file.

![](fig/selectRecordsForEdit.png){alt='MarcEdit empty Select Records for Edit dialog'}
Expand Down
Loading