[Yazlist] How exactly can I use Yaz ?

Larry E. Dixson ldix at loc.gov
Mon Jul 31 13:47:48 CEST 2006


On Sun, 30 Jul 2006, Timothy Murphy wrote:

> I wonder if some kind soul could tell me how precisely to use Yaz.
> 
> As a concrete example, I'd like to query the Library of Congress
> at <http://catalog.loc.gov/>
> and recover the information they hold on the book
> with ISBN number 0521299224,
> if possible in MARC (or even better, MARCXML) format.
> 
> I know I can get this information by going to the Library of Congress
> at the above URL, going to "Basic Search",
> entering this number in "Search Text",
> choosing "LCCN-ISBN-ISSN*" from the menu,
> and clicking on "Begin Search".
> The record for the book comes up,
> and I can choose "MARC Tags" to get the information in MARC format.
> 
> My question is, can I do that with YAZ, in particular with yaz-client ?
> If so, what programs do I need,
> and what commands exactly should I give?
> 
> -- 
> Timothy Murphy  
> e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
> tel: +353-86-2336090, +353-1-2842366
> s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

Timothy,
Below you will find a transaction log generated by the 
yaz-client while searching the LC Online Catalog.  I have 
access to YAZ on a Unix server and the Windows version on my
PC.  I don't know what version you have downloaded from
Index Data.

     http://www.indexdata.dk/yaz/

When using yaz-client in Unix, the initial command is slightly
different:

----------------------------------------------------------
$ yaz-client z3950.loc.gov:7090/voyager
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 34
Name   : Voyager LMS - Z39.50 Server (YAZ Proxy)
Version: 2003.1.1/1.2.1.1
Options: search present
Elapsed: 0.104680
----------------------------------------------------------

The following log was generated with Windows version of YAZ.
(There were no hits with ISBN "0521299224" so I substituted
"0375824898" -- a nice small record.)

----------------------------------------------------------
Z> open z3950.loc.gov:7090/voyager
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 34
Name   : Voyager LMS - Z39.50 Server (YAZ Proxy)
Version: 2003.1.1/1.2.1.1
Options: search present

Z> f @attr 1=7 0375824898
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 4
records returned: 0

Z> s 1
Sent presentRequest (1+1).
Records: 1
[VOYAGER]Record type: USmarc
00846cam  22002294a 4500
001 12961309
005 20040124151114.0
008 021008s2003    nyu           000 0 eng
035    $a (DLC)  2002114234
906    $a 0 $b ibc $c orignew $d 2 $e epcn $f 20 $g y-gencatlg
925 0  $a acquire $b 2 shelf copies $x policy default
955    $a pc03 2002-10-08 $a pv16 2003-12-17 to HLCD
010    $a   2002114234
020    $a 0375824898
040    $a DLC $c DLC $d DLC
042    $a pcc
100 1  $a Seuss, $c Dr.
245 10 $a How do you do? : $b by Thing One and Thing Two (as told to the
Cat inthe Hat) / $c Dr. Seuss ; illustrated by Christopher Moroney.
250    $a 1st ed.
260    $a New York : $b Random House Children's Books, $c c2003.
300    $a 1 v. (unpaged) ; $c 23 cm.
856 42 $3 Publisher description $u
http://www.loc.gov/catdir/description/random045/2002114234.html
nextResultSetPosition = 2

Z> format xml

Z> s 1
Sent presentRequest (1+1).
Records: 1
[VOYAGER]Record type: XML
<record xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00846cam a22002294a 4500</leader>
  <controlfield tag="001">12961309</controlfield>
  <controlfield tag="005">20040124151114.0</controlfield>
  <controlfield tag="008">021008s2003    nyu           000 0 eng
</controlfield>
  <datafield tag="035" ind1=" " ind2=" ">
    <subfield code="a">(DLC)  2002114234</subfield>
  </datafield>
  <datafield tag="906" ind1=" " ind2=" ">
    <subfield code="a">0</subfield>
    <subfield code="b">ibc</subfield>
    <subfield code="c">orignew</subfield>
    <subfield code="d">2</subfield>
    <subfield code="e">epcn</subfield>
    <subfield code="f">20</subfield>
    <subfield code="g">y-gencatlg</subfield>
  </datafield>
  <datafield tag="925" ind1="0" ind2=" ">
    <subfield code="a">acquire</subfield>
    <subfield code="b">2 shelf copies</subfield>
    <subfield code="x">policy default</subfield>
  </datafield>
  <datafield tag="955" ind1=" " ind2=" ">
    <subfield code="a">pc03 2002-10-08</subfield>
    <subfield code="a">pv16 2003-12-17 to HLCD</subfield>
  </datafield>
  <datafield tag="010" ind1=" " ind2=" ">
    <subfield code="a">  2002114234</subfield>
  </datafield>
  <datafield tag="020" ind1=" " ind2=" ">
    <subfield code="a">0375824898</subfield>
  </datafield>
  <datafield tag="040" ind1=" " ind2=" ">
    <subfield code="a">DLC</subfield>
    <subfield code="c">DLC</subfield>
    <subfield code="d">DLC</subfield>
  </datafield>
  <datafield tag="042" ind1=" " ind2=" ">
    <subfield code="a">pcc</subfield>
  </datafield>
  <datafield tag="100" ind1="1" ind2=" ">
    <subfield code="a">Seuss,</subfield>
    <subfield code="c">Dr.</subfield>
  </datafield>
  <datafield tag="245" ind1="1" ind2="0">
    <subfield code="a">How do you do? :</subfield>
    <subfield code="b">by Thing One and Thing Two (as told to the Cat in
the Hat) /</subfield>
    <subfield code="c">Dr. Seuss ; illustrated by Christopher
Moroney.</subfield>
  </datafield>
  <datafield tag="250" ind1=" " ind2=" ">
    <subfield code="a">1st ed.</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="a">New York :</subfield>
    <subfield code="b">Random House Children&apos;s Books,</subfield>
    <subfield code="c">c2003.</subfield>
  </datafield>
  <datafield tag="300" ind1=" " ind2=" ">
    <subfield code="a">1 v. (unpaged) ;</subfield>
    <subfield code="c">23 cm.</subfield>
  </datafield>
  <datafield tag="856" ind1="4" ind2="2">
    <subfield code="3">Publisher description</subfield>
    <subfield
code="u">http://www.loc.gov/catdir/description/random045/200211423
4.html</subfield>
  </datafield>
</record>
nextResultSetPosition = 2

Z> format marc21
Z> set_marcdump c:\temp\mydownload.mrc    [to capture record]

Z> s 1
Sent presentRequest (1+1).
Records: 1
[VOYAGER]Record type: USmarc
00846cam  22002294a 4500
001 12961309
005 20040124151114.0
008 021008s2003    nyu           000 0 eng
035    $a (DLC)  2002114234
906    $a 0 $b ibc $c orignew $d 2 $e epcn $f 20 $g y-gencatlg
925 0  $a acquire $b 2 shelf copies $x policy default
955    $a pc03 2002-10-08 $a pv16 2003-12-17 to HLCD
010    $a   2002114234
020    $a 0375824898
040    $a DLC $c DLC $d DLC
042    $a pcc
100 1  $a Seuss, $c Dr.
245 10 $a How do you do? : $b by Thing One and Thing Two (as told to the
Cat in
the Hat) / $c Dr. Seuss ; illustrated by Christopher Moroney.
250    $a 1st ed.
260    $a New York : $b Random House Children's Books, $c c2003.
300    $a 1 v. (unpaged) ; $c 23 cm.
856 42 $3 Publisher description $u
http://www.loc.gov/catdir/description/random0
45/2002114234.html
nextResultSetPosition = 2

Z> close
Sent close request.
Target closed connection


Z> help     [to obtain listing of available yaz-client commands]
Commands:
   open ('tcp'|'ssl')':<host>[':'<port>][/<db>]
   quit
   find <query>
   delete <setname>
   base <base-name>
   show <rec#>['+'<#recs>['+'<setname>]]
   scan <term>
   scanstep <size>
   scanpos <size>
   scansize <size>
   sort <sortkey> <flag> <sortkey> <flag> ...
   sort+ <sortkey> <flag> <sortkey> <flag> ...
   authentication <acctstring>
   lslb <largeSetLowerBound>
   ssub <smallSetUpperBound>
   mspn <mediumSetPresentNumber>
   status
   setnames
   cancel
   cancel_find <query>
   format <recordsyntax>
   schema <schema>
   elements <elementSetName>
   close
   attributeset <attrset>
   querytype <type>
   refid <id>
   itemorder ill|item <itemno>
   update <action> <recid> [<doc>]
   update0 <action> <recid> [<doc>]
   xmles <OID> <doc>
   packagename <packagename>
   proxy [('tcp'|'ssl')]<host>[':'<port>]
   charset <nego_charset> <output_charset>
   negcharset <nego_charset>
   displaycharset <output_charset>
   marccharset <charset_name>
   lang <language_code>
   . <filename>
   ! Subshell command
   set_apdufile <filename>
   set_berfile <filename>
   set_marcdump  <filename>
   set_cclfile  <filename>
   set_cqlfile  <filename>
   set_auto_reconnect  on|off
   set_auto_wait  on|off
   set_otherinfo <otherinfoinddex> <oid> <string>
   sleep <seconds>
   register_oid <name> <class> <oid>
   push_command <command>
   register_tab <commandname> <tab>
   cclparse <ccl find command>
   list_otherinfo [otherinfoinddex]
   list_all
   clear_otherinfo
   wait_response <number>
   adm-reindex <database-name>
   adm-truncate ('database'|'index')<object-name>
   adm-create
   adm-drop ('database'|'index')<object-name>
   adm-import <record-type> <dir> <pattern>
   adm-refresh
   adm-commit
   adm-shutdown
   adm-startup
   explain
   options
   zversion
   help
   init
   sru
   exit

Hope that helps.  Contact me directly if you have additional
questions.
Larry

------------------------------------------------------------
Larry E. Dixson                    Internet:    ldix at loc.gov
Network Development and MARC
   Standards Office, LA327
Library of Congress                Telephone: (202) 707-5807
Washington, D.C.  20540-4402       Fax:       (202) 707-0115




More information about the Yazlist mailing list