[open-ils-commits] r9444 - trunk/Open-ILS/src/extras/import

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 23 23:09:39 EDT 2008


Author: miker
Date: 2008-04-23 22:30:21 -0400 (Wed, 23 Apr 2008)
New Revision: 9444

Modified:
   trunk/Open-ILS/src/extras/import/marc2are.pl
Log:
use 001 as the authority record number value

Modified: trunk/Open-ILS/src/extras/import/marc2are.pl
===================================================================
--- trunk/Open-ILS/src/extras/import/marc2are.pl	2008-04-24 00:38:57 UTC (rev 9443)
+++ trunk/Open-ILS/src/extras/import/marc2are.pl	2008-04-24 02:30:21 UTC (rev 9444)
@@ -61,6 +61,9 @@
 while ( try { $rec = $batch->next } otherwise { $rec = -1 } ) {
 	next if ($rec == -1);
 	my $id = $count;
+	my $_001 = $rec->field('001');
+	my $arn = $count;
+	$arn = $_001->data if ($_001);
 
 	(my $xml = $rec->as_xml_record()) =~ s/\n//sog;
 	$xml =~ s/^<\?xml.+\?\s*>//go;
@@ -79,7 +82,7 @@
 	$bib->editor($user);
 	$bib->edit_date('now');
 	$bib->arn_source('LEGACY');
-	$bib->arn_value($count);
+	$bib->arn_value($arn);
 	$bib->last_xact_id('IMPORT-'.$starttime);
 
 	print OpenSRF::Utils::JSON->perl2JSON($bib)."\n";



More information about the open-ils-commits mailing list