Skip to main content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

University Library, University of Illinois at Urbana-Champaign

MarcEdit

An introduction to the MARC record editing software MarcEdit

Editing Subfield Data

The function below will describe how to append a subfield to the end of a field within the record. If you would like to add a subfield to a specific position within a field in accordance with schemas like MARC21, then follow the Add Subfield by Position workflow listed further down on this page. 

  1. Open the .mrk file by selecting it in the folder, which should open the file in MarcEditor, or open MarcEditor from the MarcEdit home screen and select the file in File->Open. 
  2. Select Tools > Edit Subfield Data. This dialog box should appear:

                         

3.  Enter the field and subfield code followed by the data you would like MarcEdit to search for and replace or delete. If you do not enter anything, the search will capture everything within the particular field$subfield entered.  

4. Next enter the text you would like added to the subfield. If you are simply looking to delete a particular subfield, be sure it is entered as above but do not enter anything in the Replace with box. Below is a table outlining the implications of various Search Options when checked:

 

Option             

Definition

New subfield only

Automatically adds subfield with specified data to each record within the file

Add Subfield if not present

Only adds subfield if that subfield does not exist in the record

Delete subfield

Removes specified subfield. Be sure to click Remove Text instead of Replace Text

Delete duplicated subfield Removes dulicated subfield.

Match case

Will match case when searching for text in subfield. Does not apply to replacing text

Move subfield data

Designed to subfield data into fixed length data field

Use regular expression

Specifies that search query in the field data text field is written as regular expression

  1. Once you are finished the dialog box should look something like this depending on settings:

                         

  1. Once you are ready, click “Replace Text.” Below you will see the result of the transformation specified in step 6
  2. Should you want to undo this, click Edit > Special Undo.
  3. To convert this edited record back into a MARC record from the Mnemonic format, select File > Compile File Into MARC.
  4. You will be prompted to give the compiled record a name, as the creator of MarcEdit tends to favor the creation of duplicates rather than regularly modifying the same record. 

Deleting Subfield Data

This function works within the same dialog box as the Editing Subfield Data workflow, but requires particular settings be chosen in order to delete a particular subfield. The settings needed are found in the workflow below.

  1. Open the .mrk file by selecting it in the folder, which should open the file in MarcEditor, or open MarcEditor from the MarcEdit home screen and select the file in File->Open. 
  2. Select Tools > Edit Subfield Data. 

3. Enter the field and subfield code that you would like to delete. If the subfield you would like to delete may be repeated within records, specify the text of the subfield in the “Field Data” text field. If you leave the “Field Data” field blank, it will delete each instance of that subfield. Once you have entered this information, select “Delete Subfield” from the Search Options menu. The only other options you need to worry about is the “Use regular expression” and “Match Case.” Both of these options determine how MarcEdit will perform the find function in order to delete the correct subfield data. 

  1. When you have finished, the screen should look something like this, depending on settings.

  1. When you are ready to delete the data, click “Remove Text.” Below are the results of the transformation:

                   

                   

  1. Should you want to undo this, click Edit > Special Undo.
  2. To convert this edited record back into a MARC record from the Mnemonic format, select File > Compile File into MARC.  
  3. You will be prompted to give the compiled record a name, as the creator of MarcEdit tends to favor the creation of duplicates rather than regularly modifying the same record. 

Adding Subfield by Position

Because MarcEdit does not automatically conform to a schema like MARC21, added subfields will be appended to the end of the specified field. However, if you would like to add subfields in a particular position within a datafield you have to search using a special syntax. The steps are outlined below.  

  1. Open the .mrk file by selecting it in the folder, which should open the file in MarcEditor, or open MarcEditor from the MarcEdit home screen and select the file in File > Open.
  2. Select Tools > Edit Subfield Data.
  3.  Enter the field you would like to edit. Then, instead of entering the subfield code, use the following notation in order to have MarcEdit add a datafield to a specific position within the field:
    1. First add brackets to enclose the whole statement. This informs MarcEdit that you will be using this search feature.
    2. Enter the subfield code you would like MarcEdit to place the new subfield after. For example, if you want to add the field after subfield a, enter a here.
    3. Add a second subfield that MarcEdit will use in case the field entered in step b is not present in the record, separated by a comma.
    4. Then, also separated by a comma, add a ^ followed by the field you would like the new subfield to be put before. 
      For more information about adding subfield, please see https://marcedit.reeset.net/set-subfield-insert-position

Below is an example of how this notation would be entered if I wanted to put a GMD into the 245 field, though the syntax would be the same for adding any subfield to any field.

While the text field is truncated, this entry into the Subfield text box states that MarcEdit will put the new $h field (plus whatever data follows it) into the data field after the a (if present) or p (if a is not present) but before subfield c. To conditionally add the subfield only if not present, be sure the “Add subfield if not present” box is selected. To add to all records, check “new Subfield only.” When you are ready, click “Replace Text.”

  1. The results of the operation outlined above can be seen below: 

  1. Should you want to undo this, click Edit > Special Undo.
  2. To convert this edited record back into a MARC record from the Mnemonic format, select File > Compile File into MARC
  3. You will be prompted to give the compiled record a name, as the creator of MarcEdit tends to favor the creation of duplicates rather than regularly modifying the same record.