From 4e008efa99f7251b98cd8a9ab06a6d60ea8d7552 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 25 Oct 2007 20:42:50 +0000 Subject: [PATCH] checking for duplicate 001; adding record id to 901$c git-svn-id: svn://svn.open-ils.org/ILS/trunk@7931 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/import/marc2bre.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/extras/import/marc2bre.pl b/Open-ILS/src/extras/import/marc2bre.pl index 888362ff31..f9648f1958 100755 --- a/Open-ILS/src/extras/import/marc2bre.pl +++ b/Open-ILS/src/extras/import/marc2bre.pl @@ -144,6 +144,9 @@ while ( try { $rec = $batch->next } otherwise { $rec = -1 } ) { my $tcn; ($rec, $tcn) = preprocess($rec); + + $tcn->add_subfields(c => $id); + $rec->delete_field( $_ ) for ($rec->field($id_field)); $rec->append_fields( $tcn ); @@ -192,6 +195,7 @@ sub preprocess { if (!$id) { my $f = $rec->field('001'); $id = $f->data if ($f); + $id = '' if ($dontuse_id{$id}); } if (!$id || $dontuse_id{$source.$id}) { -- 2.11.0