<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
Hello everybody,<BR>
<BR>
I am strugling with koha and Z39.50 servers for a while now. Apparently no server except UNIV OF NORTHERN WALES 147.143.2.5:210 INNOPAC worked for me. So I decided to write a simple program in perl to test the Z39.50 functionality. After solving problems revealed here: <A HREF="http://lists.indexdata.dk/pipermail/net-z3950/2003-October/000356.html">http://lists.indexdata.dk/pipermail/net-z3950/2003-October/000356.html</A> and here: <A HREF="http://lists.indexdata.dk/pipermail/net-z3950/2002-July/000136.html">http://lists.indexdata.dk/pipermail/net-z3950/2002-July/000136.html</A> I managed to write a working program:<BR>
<BR>
#!/usr/bin/perl<BR>
<BR>
use Net::Z3950;<BR>
<BR>
#$conn = new Net::Z3950::Connection("LIBRARY.MIT.EDU", 9909, databaseName => "mit01")<BR>
#$conn = new Net::Z3950::Connection("Z3950cat.bl.uk", 9909, databaseName => "BLAC")<BR>
#$conn = new Net::Z3950::Connection("z3950.nls.uk", 7290, databaseName => "Endeavor")<BR>
#$conn = new Net::Z3950::Connection("bobcat.nyu.edu", 210, databaseName => "GEAC")<BR>
$conn = new Net::Z3950::Connection("z3950.loc.gov", 7090, databaseName => "Voyager")<BR>
or die $!;<BR>
$conn->option('preferredRecordSyntax',<BR>
         Net::Z3950::RecordSyntax::USMARC);<BR>
$rs = $conn->search("\@attr 1=7 \"3764353651\"")<BR>
or die $conn->errmsg();<BR>
#$rs->option(preferredRecordSyntax => "SUTRS");<BR>
#$rs->option(preferredRecordSyntax => "XML");<BR>
#$rs->option(elementSetName => "B");<BR>
<BR>
my $n = $rs->size();<BR>
$rs->present(1, $n);<BR>
print "found $n records:\n";<BR>
foreach $i (1..$n) {<BR>
$rec = $rs->record($i) or die $rs->errmsg();<BR>
print $rec->render();<BR>
}<BR>
<BR>
$conn->close();<BR>
<BR>
Then I looked in the processz3950queue and found:<BR>
<BR>
eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq "<FONT COLOR="#ff0000"><B>MARC21</B></FONT>");<BR>
eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if ($globalsyntax eq "UNIMARC");<BR>
<BR>
however there is no MARC21 choice in z3950servers.tmpl:<BR>
<BR>
<select name="syntax"><BR>
<option value="USMARC"><B><FONT COLOR="#ff0000">USMARC</FONT></B></option><BR>
<option value="UNIMARC">UNIMARC</option><BR>
</select><BR>
<BR>
I realized then that changing MARC21 to USMARC fixes the problem. Now I can succesfully use the library of congress in my searches. <BR>
<BR>
eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq "<B><FONT COLOR="#008000">USMARC</FONT></B>");<BR>
<BR>
Hopefully this will come handy for someone else to running into the same problem.<BR>
<BR>
Best regards,<BR>
Len<BR>
<BR>
<B><FONT SIZE="1"><FONT COLOR="#474747">Marilen Aretius Corciovei</FONT></FONT></B><BR>
<FONT SIZE="1"><FONT COLOR="#474747">J2EE, Linux Consultant</FONT></FONT><BR>
<FONT SIZE="1"><FONT COLOR="#474747"><A HREF="http://len.is-a-geek.org">http://len.is-a-geek.org</A></FONT></FONT><BR>
<FONT SIZE="1"><FONT COLOR="#474747"><A HREF="http://www.nemesisit.ro">http://www.nemesisit.ro</A></FONT></FONT>
</BODY>
</HTML>