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