<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
     <!ENTITY zoomsh-commands SYSTEM "zoomsh-commands.xml">
]>
<!-- $Id: zoomsh-man.xml,v 1.1 2003/10/27 12:21:24 adam Exp $ -->
<refentry id="zoomsh">
 
 <refmeta>
  <refentrytitle>zoomsh</refentrytitle>
  <manvolnum>1</manvolnum>
 </refmeta>
 
 <refnamediv>
  <refname>zoomsh</refname>
  <refpurpose>ZOOM shell</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>zoomsh</command>
   <arg choice="opt" rep="repeat">commands</arg>
  </cmdsynopsis>
 </refsynopsisdiv>

  <refsect1><title>DESCRIPTION</title>
   <para>
    <command>zoomsh</command> is a ZOOM client with a simple
    command line interface. The client demonstrates the ZOOM
    API and is useful for testing targets.
   </para>
   <para>
    You may pass one or more commands to <command>zoomsh</command>.
    These commands are invoked first. 
   </para>
  </refsect1>
  <refsect1><title>EXAMPLES</title>
   <para>
    If you start the <command>yaz-ztest</command> in one console you
    can use the ZOOM shell as follows:
    <screen><![CDATA[
$ zoomsh
ZOOM>connect localhost:9999
ZOOM>search computer
localhost:9999: 7 hits
ZOOM>show 0 1
1 Default USmarc
001    11224466 
003 DLC
005 00000000000000.0
008 910710c19910701nju           00010 eng  
010    $a    11224466 
040    $a DLC $c DLC
050 00 $a 123-xyz
100 10 $a Jack Collins
245 10 $a How to program a computer
260 1  $a Penguin
263    $a 8710
300    $a p. cm.
ZOOM>quit
]]>
    </screen>
   </para>
   <para>
    You can also achieve the same result by passing the commands
    as arguments on a single command line:
   </para>
   <para>
    <literal>$ zoomsh "connect localhost:9999" "search computer"</literal>
    <literal>"show 0 1" quit</literal>
   </para>
  </refsect1>
  <refsect1><title>COMMANDS</title>
   <variablelist>
    
    <varlistentry><term><literal>connect</literal>
      <replaceable>zurl</replaceable></term>
     <listitem><para>
       Connects to the target given by <replaceable>zurl</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>close</literal>
      [<replaceable>zurl</replaceable>]</term>
     <listitem><para>
       Closes connection to target given by
       <replaceable>zurl</replaceable> or all targets if
       <replaceable>zurl</replaceable> was omitted.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>show</literal>
      [<replaceable>start</replaceable>
      [<replaceable>count</replaceable>]]
     </term>
     <listitem><para>
       Displays <literal>count</literal> records starting at offset given
       by <replaceable>start</replaceable>. First records has offset 0
       (unlike the Z39.50 protocol).
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>quit</literal>
     </term>
     <listitem><para>
       Quits <command>zoomsh</command>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>set</literal>
      <replaceable>name</replaceable>
      [<replaceable>value</replaceable>]
     </term>
     <listitem><para>
       Sets option <replaceable>name</replaceable> to
       <replaceable>value</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>get</literal>
      <replaceable>name</replaceable>
     </term>
     <listitem><para>
       Prints value of option <replaceable>name</replaceable>.
      </para></listitem></varlistentry>
    
    <varlistentry><term><literal>help</literal>
     </term>
     <listitem><para>
       Prints list of available commands.
      </para></listitem></varlistentry>
    
   </variablelist>
   
  </refsect1>
  <refsect1><title>SEE ALSO</title>
   <para>
    <citerefentry>
     <refentrytitle>yaz</refentrytitle>
     <manvolnum>7</manvolnum>
    </citerefentry>,
    <citerefentry>
     <refentrytitle>yaz-ztest</refentrytitle>
     <manvolnum>8</manvolnum>
    </citerefentry>,
   </para>
   <para>
    Section "Building clients with ZOOM" in the YAZ manual.
   </para>
   <para>
    <ulink url="http://zoom.z3950.org/">ZOOM home page</ulink>.
   </para>
  </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-local-catalogs: nil
sgml-namecase-general:t
End:
-->
