504_Part_III - UNTCMS/MarcEdit-Tasks GitHub Wiki

504_Part_III Edits

Link to task file:

https://github.com/UNTCMS/MarcEdit-Tasks/blob/713965ae9be8fc47baeca678bd795781e1efdd36/504_Part_III.task

Scope

Code position 31 of 008 fixed field if there are indexes

Pre-run step

Make sure there are no 008 fields that still have "bib" at the end of them. Run the following search with "use regular expressions" selected:

=008.*bib$

Steps

Find and copy all fields that contain “index” to field 999 (e.g., 500 & 504)

Copy field utility 
Source field: 500
Find in field: index
Destination field: 999

Find and copy all fields that contain “index” to field 999 (e.g., 500 & 504)

Copy field utility 
Source field: 504
Find in field: index
Destination field: 999

Standardize data in 999

Replace all
(=999.*\$a).*
$1index
Search options: Use regular expressions

Remove duplicate data in field 999

Add/Delete field utility 
Field: 999
Delete field options: Remove duplicate data
Delete field

Swap 999 $a to field 008, add to existing field

Swap field utility
Original data: 
Field: 999 $a
Modified data: 
Field: 008
Search options: Add to existing field

Correct coding

Replace all
(=008  .{31})1(.{8})$
${1}0${2}
Search options: Use regular expressions

Correct coding

Replace all
(=008  .{31})0(.{8})index
${1}1${2}
Search options: Use regular expressions

Correct coding

Replace all
(=008  .{31}1.{8})index
$1
Search options: Use regular expressions

Remove any remaining "bib" or "index" from field 008

Replace all
(=008\s\s)(.{40})(.*)
$1$2
Search options: Use regular expressions