[Koha] bulkmarcimport.pl AND -match= fails when trying to import (bibliographic) records

Nicolas Rucks nrucks at bl.fcen.uba.ar
Thu Mar 29 08:58:30 NZDT 2018

Hello again! Maybe this too easy, or too difficult, maybe I am missing a point.
As I could manage to understand, bulkmarcimport.pl requieres "-match="  with a comma (,)

(From bulkmarcimport.pl DESCRIPTION:)
        FIELD matchindex,fieldtomatch 

Could anybody show me a concrete example of "matchindex" value? how should the command be? 

Meanwhile, I tried this
perl /usr/share/koha/bin/migration_tools/bulkmarcimport.pl -biblios -v -fk -all -commit 1000 -file=/home/nrucks/20recs-modified.mrc -match=9001,035a

and got, for each of the 20 records, this:
CCL parsing error (10014) Unknown qualifier ZOOM for query: 9001="(Ag-BiblioFCEN)000000020" at /usr/share/koha/lib/C4/Search.pm line 275.
unable to search the database for duplicates : CCL parsing error (10014) Unknown qualifier ZOOM at /usr/share/koha/bin/migration_tools/patriciobulkmarcimport.pl line 290.

Any help much appreciated
Thanks and happy Easter.

Nicolas Rucks
Biblioteca Central

"Machines should not be friendly. Machines should be obedient."

----- Mensaje original -----
De: "Nicolas Rucks" <nrucks at bl.fcen.uba.ar>
Para: koha at lists.katipo.co.nz
Enviados: Jueves, 22 de Marzo 2018 17:29:45
Asunto: [Koha] bulkmarcimport.pl AND -match= fails when trying to import (bibliographic) records

Hello there!
This is my first message to the list, nice to meet you all.
I am a Systems Librarian at FCEN, Universidad de Buenos Aires.

This is the thing:
I am trying to import some bibliographic records into KOHA with BULKMARCIMPORT.PL 

I first imported the records with bulkmarcimport.pl 
perl /usr/share/koha/bin/migration_tools/bulkmarcimport.pl  -biblios  -v  -fk   -all  -commit 1000  -file=/home/nrucks/20recs.mrc 
(file /home/nrucks/20recs.mrc contains 20 marc bibliographic records)
So far so good, everything is OK, I can see the 20 new records reflected on the website, on MYSQL database and in zebra indexes (rebuilt with koha-rebuild-zebra).

Then I made some modifications to the original 20 records and tried to import then again with BULKMARCIMPORT.PL , 
only this time using the -match= option, because I don't want to ADD records, but REPLACE them with corrections.
Field 035 of each record contains and keeps a unique identifier like the following:
035    $a (Ag-BiblioFCEN)000000002

perl /usr/share/koha/bin/migration_tools/bulkmarcimport.pl -biblios -v -fk -all -commit 1000 -file=/home/nrucks/20recs-modified.mrc -match=035
(file /home/nrucks/20recs-modified.mrc has 20 marc bibliographic records, slightly modified from 20recs.mrc )

But this always fails... I get this for each of the 20 records:
.Use of uninitialized value $recorddata in pattern match (m//) at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 582, <GEN46> line 1.
unable to search the database for duplicates : No query entered at /usr/share/koha/bin/migration_tools/bulkmarcimport.pl line 290, <GEN46> line 1.

I tried some variants like -match=035a, with same results.
Note that the marc records are OK: I did try the same through the website, and worked fine: records were correctly REPLACED.
		<select name="overlay_action" id="overlay_action">
		<option value="replace" selected="selected">Reemplace un registro existente con uno nuevo</option>

But I plan to do this on a larger scale, and anyway, bulkmarcimport.pl should work.

Any recommendations as to the syntax of -match option? , or conditions of zebra index? Or options to use another field (-i ISBN will not do since many of our books do not have it)?
Or even some kind of hardcode workaround to BULKMARCIMPORT.PL (meaning "use THIS FIELD to check if record already exists"), or any other things I am obviously not taking into account?

Thanks in advance!

• VERSIONS of my installed KOHA (as stated in http:/.../about.pl):
Versión de Koha:
Versión del SO ('uname -a'): 	Linux koha 2.6.32-44-pve #1 SMP Sun Mar 13 17:00:54 CET 2016 x86_64
Versión de Perl: 	5.020002
Versión de MySQL: 	mysql Ver 14.14 Distrib 5.5.57, for debian-linux-gnu (x86_64) using readline 6.3 
Versión de Apache: 	Server version: Apache/2.4.10 (Debian) 
Versión de Zebra: 	Zebra 2.0.59 (C) 1994-2014, 

Nicolas Rucks
Biblioteca Central
"Machines should not be friendly. Machines should be obedient."
Koha mailing list  http://koha-community.org
Koha at lists.katipo.co.nz

More information about the Koha mailing list