Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz_3.0.14 / doc / client.invoking.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2. Invoking the YAZ client</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="client.html" title="Chapter 5. The YAZ client"><link rel="prev" href="client.html" title="Chapter 5. The YAZ client"><link rel="next" href="client.commands.html" title="3. Commands"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2. Invoking the YAZ client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="client.html">Prev</a> </td><th width="60%" align="center">Chapter 5. The YAZ client</th><td width="20%" align="right"> <a accesskey="n" href="client.commands.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="client.invoking"></a>2. Invoking the YAZ client</h2></div></div></div><p>
2     It can be started by typing
3    </p><div class="cmdsynopsis"><p><code class="command">yaz-client</code>  [-m <em class="replaceable"><code>fname</code></em>] [-a <em class="replaceable"><code>fname</code></em>] [-c <em class="replaceable"><code>fname</code></em>] [-q <em class="replaceable"><code>fname</code></em>] [-v <em class="replaceable"><code>level</code></em>] [-p <em class="replaceable"><code>target</code></em>] [-u <em class="replaceable"><code>auth</code></em>] [-k <em class="replaceable"><code>size</code></em>] [zurl]</p></div><p>
4     in a UNIX shell / WIN32 console. The <em class="replaceable"><code>zurl</code></em>,
5     specifies a Z39.50/SRU host and, if specified, the client first tries to
6     establish connection with the Z39.50/SRU target.
7    </p><p>
8     Options are prefixed by <code class="literal">-</code> followed by a
9     particular letter.
10     </p><p>
11     The following options are supported:
12    </p><div class="variablelist"><dl><dt><span class="term">
13       <code class="literal">-m</code> <em class="replaceable"><code>fname</code></em>
14      </span></dt><dd>All retrieved transfer records are appended to file
15        <em class="replaceable"><code>fname</code></em>. All records as returned by a
16        target(s) in Search Responses and Present Responses are appended
17        verbatim to the file.
18       </dd><dt><span class="term">
19       <code class="literal">-a</code> <em class="replaceable"><code>fname</code></em>
20      </span></dt><dd>Pretty-print log of APDUs sent and received is appended
21        to the file <em class="replaceable"><code>fname</code></em>.
22        If <em class="replaceable"><code>fname</code></em> is <code class="literal">-</code> (minus)
23        the APDU log is written to <code class="literal">stderr</code>.
24       </dd><dt><span class="term">
25       <code class="literal">-c</code> <em class="replaceable"><code>fname</code></em>
26      </span></dt><dd>Sets the filename for CCL fields to
27        <em class="replaceable"><code>fname</code></em>. If this option is not given the
28        YAZ client reads CCL fields from file <code class="literal">default.bib</code>.
29       </dd><dt><span class="term">
30       <code class="literal">-q</code> <em class="replaceable"><code>fname</code></em>
31      </span></dt><dd>Sets the filename for CQL fields to
32        <em class="replaceable"><code>fname</code></em>. If this option is not given the
33        YAZ client reads CQL fields from file
34        <code class="literal">/usr/local/share/yaz/etc/pqf.properties</code>.
35       </dd><dt><span class="term">
36       <code class="literal">-v</code> <em class="replaceable"><code>level</code></em>
37      </span></dt><dd>Sets the LOG level to <em class="replaceable"><code>level</code></em>.
38        Level is a sequence of tokens separated by comma. Each token
39        is a integer or a named LOG item - one of 
40        <code class="literal">fatal</code>,
41        <code class="literal">debug</code>,
42        <code class="literal">warn</code>,
43        <code class="literal">log</code>,
44        <code class="literal">malloc</code>,
45        <code class="literal">all</code>,
46        <code class="literal">none</code>.
47       </dd><dt><span class="term">
48       <code class="literal">-p</code> <em class="replaceable"><code>target</code></em>
49      </span></dt><dd>Specifies proxy address. When set YAZ client will
50        connect to a proxy on the address and port given. 
51        The actual target will be specified as part of the InitRequest
52        to inform the proxy about actual target.
53       </dd><dt><span class="term">
54       <code class="literal">-u</code> <em class="replaceable"><code>auth</code></em>
55      </span></dt><dd>Specifies authentication. Usually the form
56        <em class="replaceable"><code>user</code></em>/<em class="replaceable"><code>password</code></em>
57        is used. This option does the same thing as the
58        <code class="literal">auth</code> command.
59       </dd><dt><span class="term">
60       <code class="literal">-k</code> <em class="replaceable"><code>size</code></em>
61      </span></dt><dd>Specifies the maximum messages size in kilobytes.
62        The default maximum message size for the YAZ client is 1024
63        (1 MB).
64       </dd></dl></div><p>
65     In order to connect to Index Data's test Z39.50 server on
66     <code class="literal">bagel.indexdata.dk</code>, port 210 and with the
67     database name <code class="literal">marc</code>, one could type
68     </p><pre class="screen">
69      yaz-client bagel.indexdata.dk:210/marc
70     </pre><p>
71    </p><p>
72     The same server is also a SRU service. Connect to it via HTTP
73     as follows:
74     </p><pre class="screen">
75      yaz-client http://bagel.indexdata.dk:210/marc
76     </pre><p>
77    </p><p>
78     In order to enable APDU log and connect to localhost, port 210 (default)
79     and database Default (default) you'd write:
80     </p><pre class="screen">
81      yaz-client -a - localhost
82     </pre><p>
83    </p><p>
84     The following command connects to a local server via UNIX
85     socket <code class="filename">/tmp/yaz</code> and sets maximum message size to
86     5 MB.
87    </p><pre class="screen">
88     yaz-client -k 5120 unix:/tmp/yaz
89    </pre><p> 
90    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="client.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="client.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="client.commands.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. The YAZ client </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 3. Commands</td></tr></table></div></body></html>