Greetings; Thanks for this post, I've come up with something like this, I think. http://sites.google.com/site/tumtumtreeorg/library, the attached file.
A script which does the job of reading a batch file of ISBNs and getting usable marc21 records which will neatly populate an ILS system like Koha, although by definition is very restrictive in its application, is worthwhile. Coincidentally, just yesterday, a school library in Pennsylvainia, USA, had the database of the ILS fall apart. They wanted to know the easiest and most efficient procedure to get an ILS functioning again. I'm faced with the same problem, I have a school library with no card catalog and no ILS. Many of the books, a total of around 10K, in my school's library have bar codes and are fully processed as they were bought from a jobber like Baker and Taylor, but it could be ohter jobbers, Follett, Gumdrop... The bib floppies from the jobbers are lost And to top it all off, a small budget which will be nearly wiped out with the purchase of a barcode scanner, when we really need about $200,000 in books, furniture, carpets,,, whah,whah,whah What to do? Many books have ISBNs and most have bar codes. I had the thought of using a two column spreadsheeet and use a scanner to scan ISBNs , scan barcodes. I think you can see where this is going and how important your script could be. [cut] running your script I'm getting an error ZOOM error 10010 "invalid query" from diag set mike re-v <sebastien.hinde...@snv.jussieu.fr> wrote: > From: Sébastien Hinderer <sebastien.hinde...@snv.jussieu.fr> > Subject: MARC::Doc::Tutorial: ZOOM version of zm.pl > To: perl4lib@perl.org > Date: Tuesday, June 16, 2009, 4:26 AM > Dear list, > > The MARC::Doc::Tutorial contains a Z39.50 subsection which > is > illustrated by the zm.pl program. The example included in > the tutorial > uses the traditional Z3950 module. > The version below is an equivalent which uses the ZOOM > interface. > This version may be included in the tutorial if it is > considered > interesting. > > Best wishes, > Sébasien. > > zm.pl > ===== > #!/usr/bin/perl -w > > # GET-MARC-ISBN -- Get MARC records by ISBN from a Z39.50 > server > use strict; > use Carp; > use ZOOM; > use MARC::Record; > > exit if ($#ARGV < 0); > > # We handle multiple ISBNs in the same query by assembling > a > # (potentially very large) search string with Prefix Query > Notation > # that ORs the ISBN-bearing attributes. > # > # For purposes of automation, we want to request batches of > many MARC > # records. I am not a Z39.50 weenie, though, and I > don't know > # offhand if there is a limit on how big a PQN query can > be... > > my $zq = "\...@attr 1=7 ". pop(); > while (@ARGV) { $zq = '@or @attr 1=7 '. pop() ." $zq" } > > ## HERE IS THE CODE FOR Z3950 REC RETRIEVAL > # Set up connection management structures, connect > # to the server, and submit the Z39.50 query. > > my $conn = new ZOOM::Connection( > 'z3950.bnf.fr', > 2211, > databaseName => "TOUT", > user => "Z3950", > password => "Z3950_BNF", > elementSetName => "f", > preferredRecordSyntax => "1.2.840.10003.5.1" # > UNIMARC > ); > croak "Unable to connect to server" if !defined($conn); > > my $rs = $conn->search_pqf($zq); # result set > > my $numrec = $rs->size(); > print STDERR "$numrec record(s) found\n"; > > for (my $i = 0; $i < $numrec; $i++) { > # Extract MARC records from Z3950 > # result set, and load MARC::Record. > my $zrec = $rs->record($i); > my $mrec = > MARC::Record->new_from_usmarc($zrec->raw()); > print $mrec->as_formatted, "\n"; > } >