Table of Contents
Custom Value lists in MARC Report (using MARC Review)
Note: a more direct method of validating against a user-generated valuelist was introduced in MARC Report 257.
Please refer to the details here.
In anticipation of RDA, perhaps, the term 'value list' is now appearing fairly frequently on the MARC home page1). Lists such as the MARC Code list for Languages, MARC Code list for Countries, etc., have, however, been part of MARC for many, many years. So, validating our data against lists is not something new. What is new is the expectation that this type of validation will become more widely applied.
It is with this background in mind that we are developing support for user-defined value lists in MARC Report. For example, what if a user wants to validate 047 or 048 codes against one of the lists provided by IAML instead of the lists provided in MARC? In Spanish, instead of English? We think this sort of need is going to become more prevalent in the future, certainly because of RDA, but also because of the widespread adoption of MARC21 by other nations.
The rest of this article describes the steps for how, in the current release (236/3), one might validate against a custom value list in MARC Report2).
Validation of the primary MARC value lists is relatively simple. For example, the 'Lang' element of the 008 must contain a code from the MARC Codelist for Languages. There are no other conditions that need to be applied.
Validation of the other data elements may not be so straighforward. Consider the example of validating the Form of musical composition codes in 047 subfield $a. If indicator 2 is blank, then of course we will use the MARC values. But if not, we have to look at the subfield $2, and then validate the codes against whatever list is given there.
So, custom validation is going to need to be aware of 'conditions'. Fortunately, we have the perfect tool for this already: MARC Review.
The steps for creating a user value list are relatively simple:
- create a list of values
- design a pattern in MARC Review–to meet the conditions for the custom validation
- activate the saved review in MARC Report via the Cataloging Check options
We'll continue to use the 047 example in this article.
1. Create a value list
The first step is to create a value list. This list should be stored in a plain text file. Each value in the list should be on a separate line, and there should be no blank spaces before or after the value–unless those blank spaces are part of the value itself.
An example of the value list that we will use for the 047 follows:
ai an ant bac bar bbp bcs bd bfm bg bkb ...
The complete list may be found here.
Note that the two-letter codes all have a trailing blank space, thus making each value three bytes in length.
There's one other thing that's very important about your value list(s): make sure they are placed in a folder on your system that is unlikely to change. The reason for this is that MARC Report references the filename when it prepares for validation processing, and if the filename is missing, then of course, the validation will fail.
Note: the concepts for the following two steps are covered in detail iby another tutorial, and we are going to move fairly quickly through them here; if you are beginner with the program, or with MARC Review, you may wish to read:
- MARC Review Cataloging checks--overview, followed by
to gain a better understanding of the concepts involved.
2. Create a review
The next step is to start MARC Review and create the patterns needed for this validation. We will need two patterns to achieve our goal:
- the first pattern checks whether or not the 047 should be validated against our list
- the second pattern matches the contents of the subfield $a against our list
Note: since checking a long list will take processing time and slow down validation, we put the list in the second pattern instead of the first. That way, the list will only be checked if it needs to be checked (if pattern 1 returns True).
If the 047 has a second indicator of '7', and a subfield $2 containing 'iamlmf', return True:
If the 047 subfield $a does _not_ match a line in our value list, return True:
Note that we use the 'Not' rule here because–in validation–we only want to know when a value doesn't match.
Once the patterns have been created, run the review and test it to make sure it works as expected3). The goal is for MARC Review to only a produce a 'hit' when an 047 has:
- Indicator 2 = '7'
- subfield $2 = 'iamlmf', and
- subfield $a does not match a code from our value list.
Once you are sure it works, save the review.
3. Activate the review
Once the list is created and the MARC Review designed and saved, its a fairly simple matter to activate the review in MARC Report.
From the main menu, open the options on the Cataloging Checks page, and press the 'Edit' button in the MARC Review cataloging checks section.
We'll create a new group called 'My Value lists', and then add the review we just created to it. Finally, we'll edit the brief message so that it looks more like a 'real' MARC Report cataloging check message, and put a few words in the Note field.
When we are done, it will look like this:
The program shows only the first two lines of the Note field; the complete text of our note will be:
In Tag 047 (Form of Musical Composition Code), when Ind 2 = '7' (Source specified in Subf $2) and subfield $2 = 'iamlmf' (Source of code), the code in subfield $a should be taken from the IAML Musical form codes list.
When you return to the Cataloging Check options page, make sure the checkbox next to MR Cataloging Checks is selected:
Now, all that remains is to start MARC Report and see what happens …