Fix SEGV yaz-client with SRU target www.bergen.folkebibl.no/cgi-bin/sru YAZ-829
[yaz-moved-to-github.git] / doc / zoomsh-man.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
3 [
4      <!ENTITY % local SYSTEM "local.ent">
5      %local;
6      <!ENTITY % entities SYSTEM "entities.ent">
7      %entities;
8      <!ENTITY % idcommon SYSTEM "common/common.ent">
9      %idcommon;
10 ]>
11 <refentry id="zoomsh">
12  <refentryinfo>
13   <productname>YAZ</productname>
14   <productnumber>&version;</productnumber>
15   <info><orgname>Index Data</orgname></info>
16  </refentryinfo>
17
18  <refmeta>
19   <refentrytitle>zoomsh</refentrytitle>
20   <manvolnum>1</manvolnum>
21   <refmiscinfo class="manual">Commands</refmiscinfo>
22  </refmeta>
23
24  <refnamediv>
25   <refname>zoomsh</refname>
26   <refpurpose>ZOOM shell</refpurpose>
27  </refnamediv>
28
29  <refsynopsisdiv>
30   <cmdsynopsis>
31    <command>zoomsh</command>
32    <arg choice="opt"><option>-a <replaceable>apdufile</replaceable></option></arg>
33    <arg choice="opt"><option>-e</option></arg>
34    <arg choice="opt"><option>-v <replaceable>loglevel</replaceable></option></arg>
35    <arg choice="opt" rep="repeat">commands</arg>
36   </cmdsynopsis>
37  </refsynopsisdiv>
38
39   <refsect1><title>DESCRIPTION</title>
40    <para>
41     <command>zoomsh</command> is a ZOOM client with a simple
42     command line interface. The client demonstrates the ZOOM
43     API and is useful for testing targets.
44    </para>
45    <para>
46     You may pass one or more commands to <command>zoomsh</command>.
47     These commands are invoked first.
48    </para>
49   </refsect1>
50
51   <refsect1>
52    <title>OPTIONS</title>
53    <variablelist>
54     <varlistentry>
55      <term>-a <replaceable>apdufile</replaceable></term>
56      <listitem><para>
57       Logs protocol packages into apdufile (APDU log).
58       </para></listitem>
59     </varlistentry>
60     <varlistentry>
61      <term>-e</term>
62      <listitem><para>
63       Makes zoomsh stop processing commands as soon as an error occur.
64       The exit code of zoomsh is 1 if error occurs; 0 otherwise.
65       </para></listitem>
66     </varlistentry>
67     <varlistentry>
68      <term>-v <replaceable>loglevel</replaceable></term>
69      <listitem><para>
70        Sets YAZ log level to <replaceable>loglevel</replaceable>.
71       </para></listitem>
72     </varlistentry>
73    </variablelist>
74   </refsect1>
75   <refsect1><title>EXAMPLES</title>
76    <para>
77     If you start the <command>yaz-ztest</command> in one console you
78     can use the ZOOM shell as follows:
79     <screen><![CDATA[
80 $ zoomsh
81 ZOOM>connect localhost:9999
82 ZOOM>search computer
83 localhost:9999: 7 hits
84 ZOOM>show 0 1
85 1 Default USmarc
86 001    11224466
87 003 DLC
88 005 00000000000000.0
89 008 910710c19910701nju           00010 eng
90 010    $a    11224466
91 040    $a DLC $c DLC
92 050 00 $a 123-xyz
93 100 10 $a Jack Collins
94 245 10 $a How to program a computer
95 260 1  $a Penguin
96 263    $a 8710
97 300    $a p. cm.
98 ZOOM>quit
99 ]]>
100     </screen>
101    </para>
102    <para>
103     You can also achieve the same result by passing the commands
104     as arguments on a single command line:
105    </para>
106    <para>
107     <literal>$ zoomsh "connect localhost:9999" "search computer"</literal>
108     <literal>"show 0 1" quit</literal>
109    </para>
110   </refsect1>
111   <refsect1><title>COMMANDS</title>
112    <variablelist>
113
114     <varlistentry><term><literal>connect</literal>
115       <replaceable>zurl</replaceable></term>
116      <listitem><para>
117        Connects to the target given by <replaceable>zurl</replaceable>.
118       </para></listitem></varlistentry>
119
120     <varlistentry><term><literal>close</literal>
121       [<replaceable>zurl</replaceable>]</term>
122      <listitem><para>
123        Closes connection to target given by
124        <replaceable>zurl</replaceable> or all targets if
125        <replaceable>zurl</replaceable> was omitted.
126       </para></listitem></varlistentry>
127
128     <varlistentry><term><literal>show</literal>
129       [<replaceable>start</replaceable>
130       [<replaceable>count</replaceable>]]
131      </term>
132      <listitem><para>
133        Displays <literal>count</literal> records starting at offset given
134        by <replaceable>start</replaceable>. First records has offset 0
135        (unlike the Z39.50 protocol).
136       </para></listitem></varlistentry>
137
138     <varlistentry><term><literal>quit</literal>
139      </term>
140      <listitem><para>
141        Quits <command>zoomsh</command>.
142       </para></listitem></varlistentry>
143
144     <varlistentry><term><literal>set</literal>
145       <replaceable>name</replaceable>
146       [<replaceable>value</replaceable>]
147      </term>
148      <listitem><para>
149        Sets option <replaceable>name</replaceable> to
150        <replaceable>value</replaceable>.
151       </para></listitem></varlistentry>
152
153     <varlistentry><term><literal>get</literal>
154       <replaceable>name</replaceable>
155      </term>
156      <listitem><para>
157        Prints value of option <replaceable>name</replaceable>.
158       </para></listitem></varlistentry>
159
160     <varlistentry><term><literal>help</literal>
161      </term>
162      <listitem><para>
163        Prints list of available commands.
164       </para></listitem></varlistentry>
165
166    </variablelist>
167
168   </refsect1>
169   <refsect1><title>SEE ALSO</title>
170    <para>
171     <citerefentry>
172      <refentrytitle>yaz</refentrytitle>
173      <manvolnum>7</manvolnum>
174     </citerefentry>,
175     <citerefentry>
176      <refentrytitle>yaz-ztest</refentrytitle>
177      <manvolnum>8</manvolnum>
178     </citerefentry>,
179    </para>
180    <para>
181     Section "Building clients with ZOOM" in the YAZ manual.
182    </para>
183    <para>
184     <ulink url="http://zoom.z3950.org/">ZOOM home page</ulink>.
185    </para>
186   </refsect1>
187 </refentry>
188
189 <!-- Keep this comment at the end of the file
190 Local variables:
191 mode: nxml
192 nxml-child-indent: 1
193 End:
194 -->