Moved ignore files.
[yaz-moved-to-github.git] / doc / yaz-client-man.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
2  "http://www.oasis-open.org/docbook/xml/4.1/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 <!-- $Id: yaz-client-man.xml,v 1.17 2007-11-21 09:04:46 adam Exp $ -->
12 <refentry id="yaz-client">
13  <refentryinfo>
14   <productname>YAZ</productname>
15   <productnumber>&version;</productnumber>
16  </refentryinfo>
17  
18  <refmeta>
19   <refentrytitle>yaz-client</refentrytitle>
20   <manvolnum>1</manvolnum>
21  </refmeta>
22  
23  <refnamediv>
24   <refname>yaz-client</refname>
25   <refpurpose>Z39.50/SRU client for implementors</refpurpose>
26  </refnamediv>
27
28  <refsynopsisdiv>
29   <cmdsynopsis>
30    <command>yaz-client</command>
31    <arg choice="opt"><option>-a <replaceable>filename</replaceable></option></arg>
32    <arg choice="opt"><option>-b <replaceable>filename</replaceable></option></arg>
33    <arg choice="opt"><option>-c <replaceable>filename</replaceable></option></arg>
34    <arg choice="opt"><option>-d <replaceable>dump</replaceable></option></arg>
35    <arg choice="opt"><option>-f <replaceable>cmdfile</replaceable></option></arg>
36    <arg choice="opt"><option>-k <replaceable>size</replaceable></option></arg>
37    <arg choice="opt"><option>-m <replaceable>filename</replaceable></option></arg>
38    <arg choice="opt"><option>-p <replaceable>addr</replaceable></option></arg>
39    <arg choice="opt"><option>-q <replaceable>filename</replaceable></option></arg>
40    <arg choice="opt"><option>-u <replaceable>auth</replaceable></option></arg>
41    <arg choice="opt"><option>-v <replaceable>level</replaceable></option></arg>
42    <arg choice="opt"><option>-xV</option></arg>
43    <arg choice="opt">addr</arg>
44   </cmdsynopsis>
45
46  </refsynopsisdiv>
47   
48  <refsect1><title>DESCRIPTION</title>
49   <para>
50    <command>yaz-client</command> is a Z39.50/SRU client (origin) with a
51    simple command line interface that allows you to test behavior and
52    performance of Z39.50 targets and SRU servers.
53   </para>
54   <para>
55    If the <replaceable>addr</replaceable> is specified, the client creates
56    a connection to the Z39.50/SRU target at the address given.
57   </para>
58   <para>
59    When <command>yaz-client</command> is started it tries to read
60    commands from one of the following files:
61    <itemizedlist>
62     <listitem><para>
63       Command file if it is given by option -f. 
64      </para></listitem>
65     <listitem><para>
66       <filename>.yazclientrc</filename> in current working directory.
67      </para></listitem>
68     <listitem><para>
69       <filename>.yazclientrc</filename> in the user's home directory.
70       The value of the <literal>HOME</literal> is used to determine
71       the home directory. Normally, <literal>HOME</literal> is only set
72       on POSIX systems such as Linux, FreeBSD, Solaris.
73      </para></listitem>
74    </itemizedlist>
75   </para>
76  </refsect1>
77   <refsect1>
78    <title>OPTIONS</title>
79    <variablelist>
80     <varlistentry>
81      <term>-a <replaceable>filename</replaceable></term>
82      <listitem><para>
83        If specified, logging of protocol packages will be appended
84        file given. If <replaceable>filename</replaceable> is
85        specified as <literal>-</literal>, the output is written
86        to <literal>stdout</literal>.
87       </para></listitem>
88     </varlistentry>
89     <varlistentry>
90      <term>-b <replaceable>filename</replaceable></term>
91      <listitem><para>
92        If specified, YAZ will dump BER data in readable notation
93        to the file specified. If <replaceable>filename</replaceable>
94        is specified as <literal>-</literal> the output is written
95        to <literal>stdout</literal>.
96       </para></listitem>
97     </varlistentry>
98     <varlistentry>
99      <term>-c <replaceable>filename</replaceable></term>
100      <listitem><para>
101        If specified, CCL configuration will be read from
102        the file given.
103       </para></listitem>
104     </varlistentry>
105     <varlistentry>
106      <term>-d <replaceable>dump</replaceable></term>
107      <listitem><para>
108        If specified, YAZ will dump BER data for all PDUs sent and received 
109        to individual files, named
110        <replaceable>dump</replaceable>.DDD.<literal>raw</literal>, 
111        where DDD is 001, 002, 003, ..
112       </para></listitem>
113     </varlistentry>
114
115     <varlistentry>
116      <term>-f <replaceable>cmdfile</replaceable></term>
117      <listitem><para>
118       Reads commands from <replaceable>cmdfile</replaceable>. When
119       this option is used, YAZ client does not read .yazclientrc
120       from current directory or home directory.
121       </para></listitem>
122     </varlistentry>
123
124     <varlistentry>
125      <term>-k <replaceable>size</replaceable></term>
126      <listitem><para>
127       Sets preferred messages and maximum record size for Initialize
128       Request in kilobytes. Default value is 1024 (1 MB).
129       </para></listitem>
130     </varlistentry>
131     <varlistentry>
132      <term>-m <replaceable>filename</replaceable></term>
133      <listitem><para>
134        If specified, retrieved records will be appended to the file given.
135       </para></listitem>
136     </varlistentry>
137     <varlistentry>
138      <term>-p <replaceable>addr</replaceable></term>
139      <listitem><para>
140        If specified, the client will use the proxy at the address
141        given. YAZ client will
142        connect to a proxy on the address and port given. 
143        The actual target will be specified as part of the InitRequest
144        to inform the proxy about actual target.
145       </para></listitem>
146     </varlistentry>
147     <varlistentry>
148      <term>-q <replaceable>filename</replaceable></term>
149      <listitem><para>
150        If specified, CQL configuration will be read from
151        the file given.
152       </para></listitem>
153     </varlistentry>
154     <varlistentry>
155      <term>-u <replaceable>auth</replaceable></term>
156      <listitem><para>
157        If specified, the <replaceable>auth</replaceable> string
158        will be used for authentication.
159       </para></listitem>
160     </varlistentry>
161     <varlistentry><term>
162       <literal>-v</literal> <replaceable>level</replaceable>
163      </term><listitem>
164       <simpara>Sets the LOG level to <replaceable>level</replaceable>.
165        Level is a sequence of tokens separated by comma. Each token
166        is a integer or a named LOG item - one of 
167        <literal>fatal</literal>,
168        <literal>debug</literal>,
169        <literal>warn</literal>,
170        <literal>log</literal>,
171        <literal>malloc</literal>,
172        <literal>all</literal>,
173        <literal>none</literal>.
174       </simpara></listitem>
175     </varlistentry>
176     <varlistentry>
177      <term>-V</term>
178      <listitem><para>
179        Prints YAZ version.
180      </para></listitem>
181     </varlistentry>
182     <varlistentry>
183      <term>-x</term>
184      <listitem><para>
185        Makes the YAZ client print hex dumps of packages sent and received
186        on standard output.
187        </para></listitem>
188     </varlistentry>
189    </variablelist>
190   </refsect1>
191   <refsect1>
192    <title>COMMANDS</title>
193    <para>
194     The YAZ client accepts the following commands.
195    </para>
196    &yaz-client-commands;
197    </refsect1>
198  <refsect1><title>EXAMPLE</title>
199   <para>
200    The simplest example of a Prefix Query would be something like
201    <screen>
202     f knuth
203    </screen>
204    or
205    <screen>
206     f "donald knuth"
207    </screen>
208    In those queries no attributes was specified.
209    This leaves it up to the server what fields to search but
210    most servers will search in all fields. Some servers does not
211    support this feature though, and require that some attributes
212    are defined. To add one attribute you could do:
213    <screen>
214     f @attr 1=4 computer
215    </screen>
216    where we search in the title field, since the use(1) is title(4).
217    If we want to search in the author field <emphasis>and</emphasis>
218    in the title field, and in the title field using right truncation
219    it could look something like this:
220    <screen>
221     f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer
222    </screen>
223    Finally using a mix of Bib-1 and GILS attributes could look
224    something like this:
225    <screen>
226     f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather
227    </screen>
228   </para>
229  </refsect1>
230   <refsect1><title>FILES</title>
231    <para>
232     <filename>yaz-&lt;version&gt;/client/client.c</filename>
233    </para>
234    <para>
235     <filename>$HOME/.yazclientrc</filename>
236    </para>
237    <para>
238     <filename>$HOME/.yazclient.history</filename>
239    </para>
240   </refsect1>
241   <refsect1><title>SEE ALSO</title>
242    <para>
243     <citerefentry>
244      <refentrytitle>yaz</refentrytitle>
245      <manvolnum>7</manvolnum>
246     </citerefentry>
247    </para>
248   </refsect1>
249 </refentry>
250
251 <!-- Keep this comment at the end of the file
252 Local variables:
253 mode: sgml
254 sgml-omittag:t
255 sgml-shorttag:t
256 sgml-minimize-attributes:nil
257 sgml-always-quote-attributes:t
258 sgml-indent-step:1
259 sgml-indent-data:t
260 sgml-parent-document:nil
261 sgml-local-catalogs: nil
262 sgml-namecase-general:t
263 End:
264 -->