Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting started with Z39.50

4 views
Skip to first unread message

charles hobbs via perl4lib

unread,
Apr 6, 2017, 5:00:02 PM4/6/17
to Perl4lib
Hello all....I haven't posted here for a long time, but have been doing lots of interesting stuff with MARC/Perl....

I would like to know an easy way to get started with Z39.50. (For example, how to get MARC records from the LC, NLM, etc. servers)
Anyone have some program segments they would be willing to share?

Thanks for your time and help.

 
===Charles P. Hobbs cph...@yahoo.com Author of _Hidden History of Transportation in Los Angeles_ (History Press) http://www.morethanredcars.com

Patrick Hochstenbach

unread,
Apr 7, 2017, 1:45:01 AM4/7/17
to Eric Lease Morgan, Perl4lib
Hi there is also Z39.50 support in Catmandu

https://metacpan.org/pod/Catmandu::Importer::Z3950

e.g. To fetch marc you can do:

$ catmandu convert Z3950 --host z3950.loc.gov --port 7090 --databaseName Voyager --query "(title = dinosaur)" to MARC

a Perl api is included.

Patrick
________________________________________
From: Eric Lease Morgan <emo...@nd.edu>
Sent: Thursday, April 6, 2017 11:11:11 PM
To: Perl4lib
Subject: Re: Getting started with Z39.50

On Apr 6, 2017, at 4:44 PM, charles hobbs via perl4lib <perl...@perl.org> wrote:

> Hello all....I haven't posted here for a long time, but have been doing lots of interesting stuff with MARC/Perl....
>
> I would like to know an easy way to get started with Z39.50. (For example, how to get MARC records from the LC, NLM, etc. servers)
> Anyone have some program segments they would be willing to share?
>
> Thanks for your time and help.


Here is a link to a simple (read, “rudimentary”) Z39.50 search interface:

http://sites.nd.edu/emorgan/2013/11/fun/

But I’m sure your mileage will vary.

If you are comfortable with Perl, then I suggest you play with Yaz/Zoom:

http://search.cpan.org/~mirk/Net-Z3950-ZOOM/


Eric Morgan

Dennis Boone

unread,
Apr 7, 2017, 7:30:05 PM4/7/17
to Perl4lib
> Hello all....I haven't posted here for a long time, but have been
> doing lots of interesting stuff with MARC/Perl.... I would like to
> know an easy way to get started with Z39.50. (For example, how to get
> MARC records from the LC, NLM, etc. servers) Anyone have some program
> segments they would be willing to share?

Here's an extremely abbreviated code snippet that might help. You'll
need to gather appropriate values to fill in, add some error checking,
etc.

use MARC::Record;
use MARC::Charset qw(marc8_to_utf8);
use ZOOM;

$zconn = new ZOOM::Connection($zhost, $zport, databaseName => $zdbnm);
$zconn->option(preferredRecordSyntax => "usmarc");
$zrs = $zconn -> search_pqf("\@attr 1=1007 $ean");
$nr = $zrs -> size();
$marc = new_from_usmarc MARC::Record($zrs -> record($i) -> raw());

De
0 new messages