Can you tell me how to construct a particular Z39.50 query? Specifically,
how do I create a Library of Congress card number search or a MARC tag 001
search?

I am writing a simple online public access catalog. For a good time try:

  http://infomotions.com/opac/?cmd=search&query=civil*
  http://infomotions.com/opac/?cmd=search&query=perl

To build my catalog I have written a command-line driven, brain-dead
acquisition application based on the the MARC::Record tutorials. The
acquisition application takes ISBN numbers as input, searches them against
the Library of Congress's database, returns MARC records, and saves them
accordingly. My application contains this snippet of code:

  # check for command line input, a string of ISBN numbers
  exit if ($#ARGV < 0);
  
  # initialize a z39.50 query
  my $query = "[EMAIL PROTECTED] 1=7 " . pop();
  
  # populate the query with ISBN numbers
  while (@ARGV) { $query = '@or @attr 1=7 ' . pop() . " $query" }

This process works just fine, but every once in a while the queries fail
because more than one record matches an ISBN number. Consequently, I need to
be more specific. Maybe I could build a MARC tag 001 search. What does the
001 field contain? Is it normally indexed? If so, how can I create a $query
to specify a search against this field?

At the same time ISBN numbers sometimes fail because they are not found in
the data at all. In these cases I want to create a LC card number search.
Can somebody tell me how to create $query to specify a card search?

-- 
Eric Lease Morgan
University Libraries of Notre Dame




Reply via email to