MARC Batch Edit --------------- Introduction ~~~~~~~~~~~~ This function is used to batch edit MARC records either adding a field, removing a field or changing the contents of a field. .What MARC Batch Edit Can and Can't Do ************************************** MARC Batch Edit is a powerful tool, but it also has some limitations. This tool can do the following tasks to a group of MARC records: * Remove all instances of a specific tag (e.g. remove all 992 tags) * Remove all instances of a specific tag _if_ a particular subfield has a particular value (e.g. remove all 650 fields in which the $2 is _fast_) * Remove all instances of a specific subfield (e.g. remove all 245$h) * Remove all instances of a specific set of subfields * Add a field * Add a subfield to an existing field * Replace data in a specific field or subfield It cannot do more advanced tasks, such as: * Swapping data from one field to another * Deduplicating MARC records * Complex logic based on existing data For more advanced projects, you may wish to export your records and use a free tool such as http://marcedit.reeset.net/[MARCEdit] or https://github.com/edsu/pymarc[PyMarc]. ************************************** Setting Up a Batch Edit Session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Record Source:: This includes options to batch edit identifying MARC records in a record bucket, CSV file or by record id. Go! (button):: This button runs the action defined by the rule template(s). Action (Rule Type) ^^^^^^^^^^^^^^^^^^ Replace:: Replaces the value in a MARC field for a batch of records. Delete:: Removes a MARC field and its contents from the batch of records. Add:: Use this to add a field and its contents to a batch of records. Other Template Fields ^^^^^^^^^^^^^^^^^^^^^ MARC Tag:: This is used to identify the field for adding, replacing, or deleting. Subfield (optional):: Indicates which subfield is being edited. MARC Data:: Use this to indicate the data to add or used in replacing the existing data. Advanced Matching Restrictions (Optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Subfield Regular Expression:: Using PERL syntax for a regular expression to identify the data to be removed or replaced. .Running a Template to Add, Delete, or Replace MARC data . Click Cataloging->MARC Batch Edit . Select *Record source* . Select the appropriate bucket, load the CSV file or enter record id depending on *Record source* selected . Select the *Action Rule* . Enter the *MARC Tag* with no indicators (eg. 245) . Enter the *subfields* with no spaces. Subfields are optional. Multiple subfield can be entered such as _auz_. . Enter the *MARC Data* which is the value in the fields . Enter optional *Advanced Matching Restrictions* .. Subfield .. Regular Expression (using PERL syntax) . Click *Go!* . Results page will display indicating the number of records successfully edited Examples ~~~~~~~~ Adding a new field to all records ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . In the _action_ menu, choose _Add_. . In _MARC Tag_, type the MARC tag number. . Leave the _Subfields_ field blank. . In _MARC Data_, type the field you would like to add. Delete a field if it contains a particular string ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ . In the _action_ menu, choose _Delete_. . In _MARC Tag_, type the MARC tag number. . Leave the _Subfields_ field blank. . In _MARC Data_, type the field you would like to add. . In the _subfield_ field under _Advanced Matching Restriction_, type the subfield code where you expect to see the string. . In _Regular Expression_, type the string you expect to see.