MarcEditor allows users to add a field either unilaterally or on the condition that certain fields are within the document. This is another instance where it is important to point out that the file that MarcEditor manipulates allows users to search the entire document, including fields. This is especially important because the syntax for applying the conditions will be dictated by how fields are added. For the purpose of clarity and uniformity, this method will repeat many steps from the above steps. For those interested in just adding a field regardless of conditions, apply the same steps used for adding fields conditionally without selecting the conditional statements.
MarcEdit allows users to add a datafield across a group of records both by adding it to all records or adding it only to records which do not currently have that datafield. Using this workflow, users will be prompted to enter the text for the new field. This step also assumes that the batch of records have been converted from .mrc (MARC) to .mrk (Mnemonic MARC text file). To execute this process see Create MARC File for Editing in MARC Editor. This workflow will also require users to enter subfield and indicator data when adding the field, though more specific workflows exist for manipulating these areas directly: Editing Subfield Data, Edit Indicators.
When finished the dialog box should look like this:
Option |
Function Description |
Match Case |
Not used for adding fields |
Use Regular Expressions | Not used for adding fields |
Process Batch Operation | Copy Add/Delete tasks to task editor |
Insert Before |
When checked, the new field will be added in numerical order according to fields present within the record. |
Insert Last |
When checked, the new field will be appended to the end of the record |
Add field only if not present |
When checked, the new field will be added only if the record does not contain already that field |
Add field only if not duplicate | When checked, the new field will be added only if the record is not duplicate |
Add field if Present / NOT Present | When checked, the new field will be added if the record does not contain that field present or not contain that field |
Remove Duplicate Data |
Not used for adding fields |
Remove by field position | Will delete field(s) by position; one can delete multiple fields positions by adding a comma to separate fields |
Remove if field data does not match |
Will delete fields where data entered in the “Field Data” box is not matched |
These definitions apply only to fields being added, not operations where existing fields are replaced. In the example screenshot above, I have instructed MarcEdit to add a 500 Note field containing “Input Data” to all records which do not have a 500 field.
You will also see that the record is added to the datafield with no subfield, if you would like to add input to a subfield within a datafield, put \\$[subfieldcode] before the string you would like inside the datafield. To add a specific indicator, substitute it for one of the slashes.
This function allows users to globally search a set of records and delete a particular field. It utilizes the same dialog box as adding fields, but since some options only apply to deleting fields in this dialog box they are present in separate workflows. This means that the first steps for this workflow are the same as those for adding a field. Regular expressions can be used to target particular data in a field, though this function is designed to mitigate the need to account for the way fields are represented in the .mrk format within a query within a regular expression.
This will open the dialog box below:
Here I have instructed MarcEdit to remove the 500 field if and only if it contains the string “Input Data.” If you would like to delete a field which contains data in a particular subfield, be sure to include it in the “Field Data.” For example, if I wanted to delete the 500 field if it contains Input Data in subfield a, I would enter “$aInput Data”. In this example, I have instructed it to match case. It is also possible to search using regular expressions.