Wednesday, September 15, 2004 12:43 CDT Hi, Stephen, et al., Admittedly, I don't understand scripting, but doesn't the schema you gave miss definition of the Leader and the fixed fields (especially 008) which are critical to the record being valid MARC? Or is that already in MARC::Record? Just confused, Steven F. Baljkas library tech at large Koha neophyte Winnipeg, MB, Canada
From: "Stephen Hedges" <shedges@skemotah.com> Date: 2004/09/15 Wed AM 04:38:41 CDT To: "Andres Tarallo" <tarallo@ort.edu.uy> CC: koha@lists.katipo.co.nz Subject: Re: [Koha] More questions for migrating to koha
Hi, Andres -
Andres Tarallo said:
...we are trying to understand the way bulkmarcimport.pl handles MARC records, in order to feed it with properly loaded records. It's not clear for me the way i have to build my MARC records
You're writing a script using MARC::Record if I recall. So what you should do is open a file early in the script to save your records, something like:
open OUTFILE, "+>bibs" or die "Cannot open output file (bibs)";
Then go through the process of putting each record together tag by tag. Something like:
$tag100 = MARC::Field->new(100,'','','a'=>$author); $record->append_fields($tag100);
Then when you have all the tags built add the record to your output file:
print OUTFILE $record->as_usmarc();
[The perl lines above assume you are using MARC21, change accordingly for UNIMARC.]
Now you have an iso2709 file ("bibs") that you can load using bulkmarcimport.pl.
-- Stephen Hedges Skemotah Solutions, USA www.skemotah.com -- shedges@skemotah.com _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha