corrected DOCTYPE header and called emacs nxml-mode instead of sgml-mode in bottom...
[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 <!ENTITY % common SYSTEM "common/common.ent">
4 <!-- $Id: yaz-client-man.xml,v 1.7 2006-04-24 12:41:00 marc Exp $ --><!-- Index Data software --><!ENTITY url.indexdata "http://www.indexdata.com/">
5 <!ENTITY url.yaz "http://www.indexdata.com/yaz/">
6 <!ENTITY url.yaz.download "http://ftp.indexdata.com/pub/yaz/">
7 <!ENTITY url.yaz.download.win32 "http://ftp.indexdata.com/pub/yaz/win32/">
8 <!ENTITY url.yaz.mailinglist "http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist">
9 <!ENTITY url.yaz.mail "mailto:yaz-help@indexdata.dk">
10 <!ENTITY url.yazplusplus "http://www.indexdata.com/yazplusplus/">
11 <!ENTITY url.yazproxy "http://www.indexdata.com/yazproxy/">
12 <!ENTITY url.idzebra "http://www.indexdata.com/zebra/">
13 <!ENTITY url.idzebra.mailinglist "http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist">
14 <!ENTITY url.metaproxy "http://www.indexdata.com/metaproxy/">
15 <!-- Specifications and Standards --><!ENTITY url.w3c "http://www.w3.org/">
16 <!ENTITY url.xml "http://www.w3.org/XML/">
17 <!ENTITY url.sru "http://www.loc.gov/standards/sru/">
18 <!ENTITY url.sru.diagnostics "http://www.loc.gov/standards/sru/diagnostics.html">
19 <!ENTITY url.sru.diagnostics.list "http://www.loc.gov/standards/sru/diagnostics-list.html">
20 <!ENTITY url.srw "http://www.loc.gov/standards/sru/srw/">
21 <!ENTITY url.soap "http://www.w3.org/TR/soap/">
22 <!ENTITY url.z39.50 "http://www.loc.gov/z3950/agency/">
23 <!ENTITY url.z39.50.doc "http://www.loc.gov/z3950/agency/markup/toc.html">
24 <!ENTITY url.z39.50.asn.1 "http://www.loc.gov/z3950/agency/asn1.html">
25 <!ENTITY url.z39.50.diagnostics "http://www.loc.gov/z3950/agency/defns/bib1diag.html">
26 <!ENTITY url.z39.50.attset.bib1 "http://www.loc.gov/z3950/agency/defns/bib1.html">
27 <!ENTITY url.z39.50.charneg "http://www.loc.gov/z3950/agency/defns/charneg-3.html">
28 <!ENTITY url.z39.50.proximity "http://www.loc.gov/z3950/agency/markup/09.html#3.7.2">
29 <!ENTITY url.z39.50.proximity.asn1 "http://www.loc.gov/z3950/agency/asn1.html#ProximityOperator">
30 <!ENTITY url.z39.50.oids "http://www.loc.gov/z3950/agency/defns/oids.html">
31 <!ENTITY url.asn.1.tutorial "http://asn1.elibel.tm.fr/en/introduction/">
32 <!ENTITY url.asn.1.standards "http://asn1.elibel.tm.fr/en/standards/">
33 <!ENTITY url.cql "http://www.loc.gov/standards/sru/cql/">
34 <!ENTITY url.cql.intro "http://zing.z3950.org/cql/intro.html">
35 <!ENTITY url.xcql "http://www.loc.gov/standards/sru/xml-files/srw-types.xsd">
36 <!ENTITY url.zoom "http://zoom.z3950.org/">
37 <!ENTITY url.marc21 "http://www.loc.gov/marc/">
38 <!ENTITY url.marc8 "http://www.loc.gov/marc/specifications/speccharmarc8.html">
39 <!ENTITY url.marcxml "http://www.loc.gov/standards/marcxml/">
40 <!ENTITY url.ill "http://www.nlc-bnc.ca/iso/ill/">
41 <!ENTITY url.ber.over.tcpip "http://www.faqs.org/rfcs/rfc1729.html">
42 <!ENTITY url.http "http://www.w3.org/Protocols/">
43 <!ENTITY url.http.1.1 "http://www.w3.org/Protocols/rfc2616/rfc2616.html">
44 <!-- External libraries + tools --><!ENTITY url.apache "http://httpd.apache.org/">
45 <!ENTITY url.apache.directive.proxypass "http://httpd.apache.org/docs/mod/mod_proxy.html#proxypass">
46 <!ENTITY url.bison "http://www.gnu.org/software/bison/">
47 <!ENTITY url.libxml2 "http://xmlsoft.org/">
48 <!ENTITY url.libxml2.api "http://www.xmlsoft.org/html/index.html">
49 <!ENTITY url.libxml2.api.tree "http://www.xmlsoft.org/html/libxml-tree.html">
50 <!ENTITY url.libxslt "http://xmlsoft.org/XSLT/">
51 <!ENTITY url.libxml2.download.win32 "http://www.zlatkovic.com/libxml.en.html">
52 <!ENTITY url.autoconf "http://www.gnu.org/software/autoconf/">
53 <!ENTITY url.automake "http://www.gnu.org/software/automake/">
54 <!ENTITY url.libtool "http://www.gnu.org/software/libtool/">
55 <!ENTITY url.libiconv "http://www.gnu.org/software/libiconv/">
56 <!ENTITY url.tcl "http://www.tcl.tk/">
57 <!ENTITY url.perl "http://www.perl.com/">
58 <!ENTITY url.gcc "http://gcc.gnu.org/">
59 <!ENTITY url.vstudio "http://msdn.microsoft.com/vstudio/">
60 <!ENTITY url.boost "http://www.boost.org/">
61 <!ENTITY url.boost.compilers.status "http://www.boost.org/status/compiler_status.html">
62 <!ENTITY url.openssl "http://www.openssl.org/">
63 <!ENTITY url.unxutils "http://unxutils.sourceforge.net/">
64 <!ENTITY url.tcpwrapper "ftp://ftp.porcupine.org/pub/security/index.html">
65 <!-- Operating Systems --><!ENTITY url.linux.kernel "http://www.kernel.org/">
66 <!ENTITY url.debian "http://www.debian.org/">
67 <!ENTITY url.redhat "http://www.redhat.com/">
68 <!ENTITY url.gentoo "http://www.gentoo.org/">
69 <!ENTITY url.freebsd "http://www.freebsd.org/">
70 <!ENTITY url.macosx "http://www.apple.com/macosx/">
71 <!ENTITY url.solaris "http://www.sun.com/software/solaris/">
72 <!ENTITY url.windows2000 "http://www.microsoft.com/windows2000/">
73 <!ENTITY url.windows2003server "http://www.microsoft.com/windowsserver2003/default.mspx">
74 <!ENTITY url.netbsd "http://www.netbsd.org/">
75 <!ENTITY url.openbsd "http://www.openbsd.org/">
76 <!ENTITY url.ubunto "http://www.ubuntu.com/">
77 <!ENTITY yaz-client-commands SYSTEM "yaz-client-commands.xml">
78 ]>
79 <!-- $Id: yaz-client-man.xml,v 1.7 2006-04-24 12:41:00 marc Exp $ -->
80 <refentry id="yaz-client">
81  
82  <refmeta>
83   <refentrytitle>yaz-client</refentrytitle>
84   <manvolnum>1</manvolnum>
85  </refmeta>
86  
87  <refnamediv>
88   <refname>yaz-client</refname>
89   <refpurpose>Z39.50/SRW client for implementors</refpurpose>
90  </refnamediv>
91
92  <refsynopsisdiv>
93   <cmdsynopsis>
94    <command>yaz-client</command>
95    <arg choice="opt"><option>-a <replaceable>filename</replaceable></option></arg>
96    <arg choice="opt"><option>-b <replaceable>filename</replaceable></option></arg>
97    <arg choice="opt"><option>-c <replaceable>filename</replaceable></option></arg>
98    <arg choice="opt"><option>-d <replaceable>dump</replaceable></option></arg>
99    <arg choice="opt"><option>-k <replaceable>size</replaceable></option></arg>
100    <arg choice="opt"><option>-m <replaceable>filename</replaceable></option></arg>
101    <arg choice="opt"><option>-p <replaceable>addr</replaceable></option></arg>
102    <arg choice="opt"><option>-q <replaceable>filename</replaceable></option></arg>
103    <arg choice="opt"><option>-u <replaceable>auth</replaceable></option></arg>
104    <arg choice="opt"><option>-xV</option></arg>
105    <arg choice="opt">addr</arg>
106   </cmdsynopsis>
107
108  </refsynopsisdiv>
109   
110   <refsect1><title>DESCRIPTION</title>
111    <para>
112     <command>yaz-client</command> is a Z39.50/SRW client (origin) with a
113     simple command line interface that allows you to test behavior and
114     performance of Z39.50 targets and SRW servers.
115    </para>
116    <para>
117     If the <replaceable>addr</replaceable> is specified, the client creates
118     a connection to the Z39.50/SRW target at the address given.
119    </para>
120   <para>
121    When <command>yaz-client</command> is invoked it attemps to read the
122    following files:
123    <literal>$HOME/.yazclientrc</literal> (home directory, Unix only) and
124    <literal>.yazclientrc</literal> (current directory - any platform)
125    For those files that are readable, the YAZ client executes commands
126    in those files. See COMMANDS section for description of commands.
127   </para>
128  </refsect1>
129   <refsect1>
130    <title>OPTIONS</title>
131    <variablelist>
132     <varlistentry>
133      <term>-a <replaceable>filename</replaceable></term>
134      <listitem><para>
135        If specified, logging of protocol packages will be appended
136        file given. If <replaceable>filename</replaceable> is
137        specified as <literal>-</literal>, the output is written
138        to <literal>stdout</literal>.
139       </para></listitem>
140     </varlistentry>
141     <varlistentry>
142      <term>-b <replaceable>filename</replaceable></term>
143      <listitem><para>
144        If specified, YAZ will dump BER data in readable notation
145        to the file specified. If <replaceable>filename</replaceable>
146        is specified as <literal>-</literal> the output is written
147        to <literal>stdout</literal>.
148       </para></listitem>
149     </varlistentry>
150     <varlistentry>
151      <term>-c <replaceable>filename</replaceable></term>
152      <listitem><para>
153        If specified, CCL configuration will be read from
154        the file given.
155       </para></listitem>
156     </varlistentry>
157     <varlistentry>
158      <term>-d <replaceable>dump</replaceable></term>
159      <listitem><para>
160        If specified, YAZ will dump BER data for all PDUs sent and received 
161        to individual files, named
162        <replaceable>dump</replaceable>.DDD.<literal>raw</literal>, 
163        where DDD is 001, 002, 003, ..
164       </para></listitem>
165     </varlistentry>
166     <varlistentry>
167      <term>-k <replaceable>size</replaceable></term>
168      <listitem><para>
169       Sets preferred messages and maximum record size for Initialize
170       Request in kilobytes. Default value is 1024 (1 MB).
171       </para></listitem>
172     </varlistentry>
173     <varlistentry>
174      <term>-m <replaceable>filename</replaceable></term>
175      <listitem><para>
176        If specified, retrieved records will be appended to the file given.
177       </para></listitem>
178     </varlistentry>
179     <varlistentry>
180      <term>-p <replaceable>addr</replaceable></term>
181      <listitem><para>
182        If specified, the client will use the proxy at the address
183        given.
184       </para></listitem>
185     </varlistentry>
186     <varlistentry>
187      <term>-q <replaceable>filename</replaceable></term>
188      <listitem><para>
189        If specified, CQL configuration will be read from
190        the file given.
191       </para></listitem>
192     </varlistentry>
193     <varlistentry>
194      <term>-u <replaceable>auth</replaceable></term>
195      <listitem><para>
196        If specified, the <replaceable>auth</replaceable> string
197        will be used for authentication.
198       </para></listitem>
199     </varlistentry>
200     <varlistentry>
201      <term>-V</term>
202      <listitem><para>
203        Prints YAZ version.
204      </para></listitem>
205     </varlistentry>
206     <varlistentry>
207      <term>-x</term>
208      <listitem><para>
209        Makes the YAZ client print hex dumps of packages sent and received
210        on standard output.
211        </para></listitem>
212     </varlistentry>
213    </variablelist>
214   </refsect1>
215   <refsect1>
216    <title>COMMANDS</title>
217    <para>
218     The YAZ client accepts the following commands.
219    </para>
220    
221 <!-- 
222    $Id: yaz-client-man.xml,v 1.7 2006-04-24 12:41:00 marc Exp $
223    Commands for YAZ client.
224    Included in both manual and man page for yaz-client.
225 -->
226 <variablelist>
227  <varlistentry id="command-open"><term>
228    <literal>open </literal><replaceable>zurl</replaceable>
229   </term>
230   <listitem>
231    <para>Opens a connection to a server. The syntax for
232     <replaceable>zurl</replaceable> is the same as described
233     above for connecting from the command line.
234    </para>
235    <para>
236     Syntax:
237    </para>
238    <para>
239     [<literal>(tcp|ssl|unix|http)':'</literal>]<replaceable>host</replaceable>
240     [:<replaceable>port</replaceable>][/<replaceable>base</replaceable>]
241    </para>
242   </listitem>
243  </varlistentry>
244  <varlistentry><term>
245    <literal>quit</literal>
246   </term>
247   <listitem>
248    <para>Quits YAZ client</para>
249   </listitem>
250  </varlistentry>
251  <varlistentry id="command-find"><term>
252    <literal>find </literal><replaceable>query</replaceable></term>
253   <listitem>
254    <para>Sends a Search Request using the <replaceable>query</replaceable>
255     given. By default the query is assumed to be PQF. See command
256     <link linkend="command-querytype"><literal>querytype</literal></link>.
257    </para>
258   </listitem>
259  </varlistentry>
260  <varlistentry><term>
261    <literal>delete</literal> <replaceable>setname</replaceable></term>
262   <listitem>
263    <para>Deletes result set with name <replaceable>setname</replaceable>
264     on the server.</para>
265   </listitem>
266  </varlistentry>
267  <varlistentry><term>
268    <literal>base </literal><replaceable>base1</replaceable>
269    <replaceable>base2</replaceable> ...
270   </term>
271   <listitem>
272    <para>Sets the name(s) of the database(s) to search. One or more
273     databases may be specified separated by blanks. This commands overrides
274     the database given in <replaceable>zurl</replaceable>.
275    </para>
276   </listitem>
277  </varlistentry>
278  <varlistentry><term>
279    <literal>show </literal>
280    [<replaceable>start</replaceable>[+<replaceable>number</replaceable>]]
281   </term>
282   <listitem>
283    <para>Fetches records by sending a Present Request from the start
284     position given by
285     <replaceable>start</replaceable>
286     a number of records given by <replaceable>number</replaceable>. If
287     <replaceable>start</replaceable> is not given, then the client
288     will fetch from position of the last retrieved record plus 1. If
289     <replaceable>number</replaceable> is not given, then one record will
290     be fetched at a time.
291    </para>
292   </listitem>
293  </varlistentry>
294  <varlistentry><term>
295    <literal>scan</literal> <replaceable>term</replaceable>
296   </term>
297   <listitem>
298    <simpara>Scans
299     database index for a term. The syntax resembles the syntax
300     for <link linkend="command-find"><literal>find</literal></link>.
301     If you want to scan for the word <literal>water</literal> you could
302     write
303    </simpara>
304    <screen>
305     scan water
306    </screen>
307    <simpara>
308     but if you want to scan only in, say the title field, you would write
309    </simpara>
310    <screen>
311     scan @attr 1=4 water
312    </screen>
313   </listitem>
314  </varlistentry>
315  <varlistentry><term>
316    <literal>scanpos</literal> <replaceable>pos</replaceable>
317   </term>
318   <listitem>
319    <simpara>
320     Sets preferred position for scan. This value
321     is used in next scan. By default position is 1.
322    </simpara>
323   </listitem>
324  </varlistentry>
325  <varlistentry><term>
326    <literal>scansize</literal> <replaceable>size</replaceable>
327   </term>
328   <listitem>
329    <simpara>
330     Sets number of entries to be returned by scan. Default
331     number of entries is 20.
332    </simpara>
333   </listitem>
334  </varlistentry>
335  <varlistentry><term>
336    <literal>scanstep</literal> <replaceable>step</replaceable>
337   </term>
338   <listitem>
339    <simpara>
340     Set step-size for scan. This value is used in next scan
341     sent to the target. By default step-size is 0.
342    </simpara>
343   </listitem>
344  </varlistentry>
345  <varlistentry id="sortspec"><term>
346    <literal>sort</literal> <replaceable>sortspecs</replaceable>
347   </term>
348   <listitem>
349    <para>Sorts a result set. The sort command takes a
350     sequence of space-separated sort specifications, with each sort
351     specification consisting of two space-separated words (so that the
352     whole specification list is made up of an even number of words).
353     The first word of each specification
354     holds a field (sort criterion) and the second holds flags.
355     If the sort criterion includes <literal>=</literal> it is assumed
356     that the <literal>SortKey</literal> is of type
357     <literal>sortAttributes</literal> using Bib-1: in this case
358     the integer before <literal>=</literal> is
359     the attribute type and the integer following <literal>=</literal>
360     is the attribute value.
361     If no <literal>=</literal> is in the criterion it is treated as a
362     sortfield of type InternationalString.
363     The flags word of each sort specification must consist of
364     <literal>s</literal> 
365     for case sensitive or <literal>i</literal> for case insensitive, and
366     <literal>&lt;</literal> for ascending order or <literal>&gt;</literal>
367     for descending order.
368    </para>
369   </listitem>
370  </varlistentry>
371  <varlistentry><term>
372    <literal>sort+</literal>
373   </term>
374   <listitem>
375    <para>Same as <literal>sort</literal> but stores the sorted
376     result set in a new result set.
377    </para>
378   </listitem>
379  </varlistentry>
380  <varlistentry><term>
381    <literal>authentication</literal> <replaceable>openauth</replaceable>
382   </term>
383   <listitem>
384    <para>Sets up a authentication string if a server requires
385     authentication (v2 OpenStyle). The authentication string is first
386     sent to the server when the 
387     <link linkend="command-open"><literal>open</literal></link> command is
388     issued and the Z39.50 Initialize Request is sent, so this command
389     must be used before <literal>open</literal> in order to be effective.
390     A common convention for the <replaceable>authopen</replaceable> string
391     is that the username - and password is separated by a slash, e.g.
392     <literal>myusername/mysecret</literal>.
393    </para>
394   </listitem>
395  </varlistentry>
396
397  <varlistentry><term>
398    <literal>list_all</literal>
399   </term>
400   <listitem>
401    <para>This command displays status and values for many settings.
402    </para>
403   </listitem>
404  </varlistentry>
405  
406  <varlistentry><term>
407    <literal>lslb</literal> <replaceable>n</replaceable>
408   </term>
409   <listitem>
410    <para>Sets the limit for when no records should be returned
411     together with the search result.
412     See the
413     <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
414      Z39.50 standard
415     </ulink>
416     for more details.
417    </para>
418   </listitem>
419  </varlistentry>
420
421  <varlistentry><term>
422    <literal>ssub</literal> <replaceable>n</replaceable>
423   </term>
424   <listitem>
425    <para>Sets the limit for when all records should be returned with
426     the search result.
427     See the
428     <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
429      Z39.50 standard
430     </ulink> for more details.
431    </para>
432   </listitem>
433  </varlistentry>
434  
435  <varlistentry><term>
436    <literal>mspn</literal> <replaceable>n</replaceable>
437   </term>
438   <listitem>
439    <para>Sets the number of records should be returned if the
440     number of records in the result set is between the values of
441     <literal>lslb</literal> and <literal>ssub</literal>.
442     See the
443     <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
444      Z39.50 standard
445     </ulink>
446     for more details.
447    </para>
448   </listitem>
449  </varlistentry>
450  <varlistentry><term>
451    <literal>status</literal>
452   </term>
453   <listitem>
454    <para>Displays the values of <literal>lslb</literal>,
455     <literal>ssub</literal> and <literal>mspn</literal>.
456    </para>
457   </listitem>
458  </varlistentry>
459  <varlistentry><term>
460    <literal>setname</literal>
461   </term>
462   <listitem>
463    <para>Switches named result sets on and off. Default is on.
464    </para>
465   </listitem>
466  </varlistentry>
467  <varlistentry><term>
468    <literal>cancel</literal>
469   </term>
470   <listitem>
471    <para>Sends a Trigger Resource Control Request to the target.
472    </para>
473   </listitem>
474  </varlistentry>
475  <varlistentry><term>
476    <literal>format</literal> <replaceable>oid</replaceable>
477   </term>
478   <listitem>
479    <para>Sets the preferred transfer syntax for retrieved records.
480     yaz-client supports all the record syntaxes that currently
481     are registered. See
482     <ulink url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
483      Z39.50 Standard
484     </ulink>
485     for more details. Commonly used records syntaxes include usmarc,
486     sutrs, grs1 and xml.
487    </para>
488   </listitem>
489  </varlistentry>
490  <varlistentry><term>
491    <literal>elements</literal> <replaceable>e</replaceable>
492   </term>
493   <listitem>
494    <para>Sets the element set name for the records. Many targets support
495     element sets are B (for brief) and F (for full).
496    </para>
497   </listitem>
498  </varlistentry>
499  <varlistentry><term>
500    <literal>close</literal>
501   </term>
502   <listitem>
503    <para>Sends a Z39.50 Close APDU and closes connection with the peer
504    </para>
505   </listitem>
506  </varlistentry>
507  <varlistentry id="command-querytype"><term>
508    <literal>querytype</literal> <replaceable>type</replaceable>
509   </term>
510   <listitem>
511    <para>Sets the query type as used by command 
512    <link linkend="command-find"><literal>find</literal></link>.
513     The following is supported:
514     <literal>prefix</literal> for
515         <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
516     <literal>ccl</literal> for CCL search (Type-2 Query),
517     <literal>cql</literal> for CQL (Type-104 search with CQL OID),
518     <literal>ccl2rpn</literal> for
519         <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
520     <literal>cql2rpn</literal> for
521         CQL to RPN conversion (Type-1 Query).
522    </para>
523   </listitem>
524  </varlistentry>
525  <varlistentry><term>
526    <literal>attributeset</literal> <replaceable>set</replaceable>
527   </term>
528   <listitem>
529    <para>
530     Sets attribute set OID for prefix queries (RPN, Type-1).
531    </para>
532   </listitem>
533  </varlistentry>
534  <varlistentry><term>
535    <literal>refid</literal> <replaceable>id</replaceable>
536   </term>
537   <listitem>
538    <para>Sets reference ID for Z39.50 Request(s).
539    </para>
540   </listitem>
541  </varlistentry>
542  <varlistentry><term>
543    <literal>itemorder</literal>
544    <replaceable>type</replaceable> <replaceable>no</replaceable>
545   </term>
546   <listitem>
547    <para>Sends an Item Order Request using the ILL External. 
548     <replaceable>type</replaceable> is either 1 or 2 which corresponds to
549     ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
550     is the Result Set position of the record to be ordered.
551    </para>
552   </listitem>
553  </varlistentry>
554  <varlistentry><term>
555    <literal>update</literal>
556    <replaceable>action</replaceable>
557    <replaceable>recid</replaceable>
558    <replaceable>doc</replaceable>
559   </term>
560   <listitem>
561    <para>Sends Item Update Request. The <replaceable>action</replaceable>
562     argument must be the action type: one of <literal>insert</literal>,
563     <literal>replace</literal>, <literal>delete</literal> and
564     <literal>update</literal>. The second argument, 
565     <replaceable>recid</replaceable>, is the
566     record identifier (any string). Third argument which is optional is
567     the record document for the request. If doc is a quoted string
568     (double quotes) the string content is used verbatim. If doc is not
569     a quoted string, it is assumed to be a filename which is read, then
570     sent as the docuemnt content. If doc is omitted, the last received
571     record (as parf of present response or piggybacked search response) 
572     is used for the update.
573    </para>
574   </listitem>
575  </varlistentry>
576
577  <varlistentry><term>
578    <literal>.</literal>
579    <replaceable>filename</replaceable>
580   </term>
581   <listitem>
582    <para>Executes list of commands from
583     file <replaceable>filename</replaceable>, just like source on
584     most UNIX shells.
585    </para>
586   </listitem>
587  </varlistentry>
588
589  <varlistentry><term>
590    <literal>!</literal>
591    <replaceable>args</replaceable>
592   </term>
593   <listitem>
594    <para>Executes command <replaceable>args</replaceable> in subshell
595     using the <literal>system</literal> call.
596    </para>
597   </listitem>
598  </varlistentry>
599
600  <varlistentry><term>
601    <literal>push_command</literal>
602    <replaceable>command</replaceable>
603   </term>
604   <listitem>
605    <para>The push_command takes another command as its argument.
606     That command is then added to the history information (so
607     you can retrieve it later). The command itself is not
608     executed. This command only works if you have GNU readline/history
609     enabled.
610    </para>
611   </listitem>
612  </varlistentry>
613
614  <varlistentry><term>
615    <literal>set_apdufile</literal>
616    <replaceable>filename</replaceable>
617   </term>
618   <listitem>
619    <para>Sets that APDU should be logged to file
620     <replaceable>filename</replaceable>. Another way to achieve
621     APDU log is by using command-line option <literal>-a</literal>.
622    </para>
623   </listitem>
624  </varlistentry>
625
626  <varlistentry><term>
627    <literal>set_auto_reconnect</literal>
628    <replaceable>flag</replaceable>
629   </term>
630   <listitem>
631    <para>Specifies whether YAZ client automatically reconnect if
632     target closes connection (Z39.50 only).
633    </para>
634    <para>
635     <replaceable>flag</replaceable> must be either
636     <literal>on</literal> or <literal>off</literal>.
637    </para>
638   </listitem>
639  </varlistentry>
640
641  <varlistentry id="command-set-auto-wait"><term>
642    <literal>set_auto_wait</literal>
643    <replaceable>flag</replaceable>
644   </term>
645   <listitem>
646    <para>Specifies whether YAZ client should wait for
647    response protocol packages after a request.
648    By default YAZ client waits (on) for response packages immediately
649    after a command (find, show) has been issued. If <literal>off</literal>
650    is used, YAZ client does not attempt to receive packages automatically.
651    These will have to be manually received when command 
652    <link linkend="command-wait-response">
653     <literal>wait_response</literal>
654    </link> is used.
655    </para>
656    <para>
657    <replaceable>flag</replaceable> must be either
658    <literal>on</literal> or <literal>off</literal>.
659    </para>
660   </listitem>
661  </varlistentry>
662
663  <varlistentry><term>
664    <literal>set_marcdump</literal>
665    <replaceable>filename</replaceable>
666   </term>
667   <listitem>
668    <para>Specifies that all retrieved records should be appended to
669     file <replaceable>filename</replaceable>. This command does the
670     thing as option <literal>-m</literal>.
671    </para>
672   </listitem>
673  </varlistentry>
674
675  <varlistentry><term>
676    <literal>schema</literal>
677    <replaceable>schemaid</replaceable>
678   </term>
679   <listitem>
680    <para>Specifies schema for retrieval.
681     Schema may be specified as an OID for Z39.50.
682     For SRW, schema is a simple string URI.
683    </para>
684   </listitem>
685  </varlistentry>
686
687  <varlistentry id="command-charset"><term>
688    <literal>charset</literal>
689    <replaceable>negotiationcharset</replaceable>
690    [<replaceable>displaycharset</replaceable>]
691    [[<replaceable>marccharset</replaceable>]]
692   </term>
693   <listitem>
694    <para>Specifies character set (encoding) for Z39.50
695     negotiation / SRW encoding and/or character set for output (terminal).
696    </para>
697    <para>
698     <replaceable>negotiationcharset</replaceable> is the name
699     of the character set to be negotiated by the server. The special name
700     <literal>-</literal> for <replaceable>negotiationcharset</replaceable>
701     specifies <emphasis>no</emphasis> character set to be negotiated.
702    </para>
703    <para>
704     If <replaceable>displaycharset</replaceable> is given, it specifies name
705     of the character set of the output (on the terminal on which
706     YAZ client is running). To disable conversion of characters
707     to the output encoding, the special name <literal>-</literal> (dash)
708     can be used.
709     If the special name <literal>auto</literal> is given, YAZ client will
710     convert strings to the encoding of the
711     terminal as returned by <function>nl_langinfo</function> call.
712    </para>
713    <para>
714     If <replaceable>marcharset</replaceable> is given, it specifies name
715     of the character set of retrieved MARC records from server. See
716     also <literal>marcharset</literal> command.
717    </para>
718    <note>
719     <para>
720      Since character set negotation takes effect in the Z39.50
721      Initialize Request you should issue this command before
722      command <link linkend="command-open"><literal>open</literal></link>
723      is used.
724     </para>
725    </note>
726    <note>
727     <para>
728      MARC records are not covered by Z39.50 character set negotiation,
729      so that's why there is a separate character that must be known
730      in order to do meaningful converson(s).
731     </para>
732    </note>
733   </listitem>
734  </varlistentry>
735
736  <varlistentry><term>
737    <literal>negcharset</literal>
738    <replaceable>charset</replaceable>
739   </term>
740   <listitem>
741    <para>Specifies character set for negotiation (Z39.50). The
742     argument is the same as second argument for command
743     <link linkend="command-charset"><literal>charset</literal></link>.
744    </para>
745   </listitem>
746  </varlistentry>
747
748  <varlistentry><term>
749    <literal>displaycharset</literal>
750    <replaceable>charset</replaceable>
751   </term>
752   <listitem>
753    <para>Specifies character set for output (display). The
754     argument is the same as second argument for command 
755     <link linkend="command-charset"><literal>charset</literal></link>.
756    </para>
757   </listitem>
758  </varlistentry>
759
760  <varlistentry><term>
761    <literal>marccharset</literal>
762    <replaceable>charset</replaceable>
763   </term>
764   <listitem>
765    <para>Specifies character set for retrieved MARC records so
766     that YAZ client can display them in a character suitable
767     for your display. See <literal>charset</literal> command.
768     If <literal>auto</literal> is given, YAZ will assume
769     that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
770     for all other MARC variants. The charset argument is the
771     same as third argument for command
772     <link linkend="command-charset"><literal>charset</literal></link>.
773    </para>
774   </listitem>
775  </varlistentry>
776
777  <varlistentry><term>
778    <literal>set_cclfile</literal>
779    <replaceable>filename</replaceable>
780   </term>
781   <listitem>
782    <para>Specifies that CCL fields should be read from file
783     file <replaceable>filename</replaceable>. This command does the
784     thing as option <literal>-c</literal>.
785    </para>
786   </listitem>
787  </varlistentry>
788
789  <varlistentry><term>
790    <literal>set_cqlfile</literal>
791    <replaceable>filename</replaceable>
792   </term>
793   <listitem>
794    <para>Specifies that CQL fields should be read from file
795     file <replaceable>filename</replaceable>. This command does the
796     thing as option <literal>-q</literal>.
797    </para>
798   </listitem>
799  </varlistentry>
800
801  <varlistentry><term>
802    <literal>register_oid</literal>
803    <replaceable>name</replaceable>
804    <replaceable>class</replaceable>
805    <replaceable>OID</replaceable>
806   </term>
807   <listitem>
808    <para>This command allows you to register your own object
809     identifier - so that instead of entering a long dot-notation
810     you can use a short name instead.
811     The <replaceable>name</replaceable> is your
812     name for the OID, <replaceable>class</replaceable> is the
813     class, and <replaceable>OID</replaceable> is the raw OID in
814     dot notation. Class is one <literal>appctx</literal>,
815     <literal>absyn</literal>, <literal>attet</literal>,
816     <literal>transyn</literal>, <literal>diagset</literal>,
817     <literal>recsyn</literal>, <literal>resform</literal>,
818     <literal>accform</literal>, <literal>extserv</literal>,
819     <literal>userinfo</literal>, <literal>elemspec</literal>,
820     <literal>varset</literal>, <literal>schema</literal>,
821     <literal>tagset</literal>, <literal>general</literal>.
822     If you're in doubt use the <literal>general</literal>
823     class.
824    </para>
825   </listitem>
826  </varlistentry>
827
828  <varlistentry><term>
829    <literal>register_tab</literal>
830    <replaceable>command</replaceable>
831    <replaceable>string</replaceable>
832   </term>
833   <listitem>
834    <para>This command registers a TAB completion string for
835     the command given.
836    </para>
837   </listitem>
838  </varlistentry>
839
840  <varlistentry><term>
841    <literal>sleep</literal>
842    <replaceable>seconds</replaceable>
843   </term>
844   <listitem>
845    <para>This command makes YAZ client sleep (be idle) for
846     the number of seconds given.
847    </para>
848   </listitem>
849  </varlistentry>
850
851  <varlistentry id="command-wait-response"><term>
852    <literal>wait_response</literal>
853    [ <replaceable>number</replaceable>]
854   </term>
855   <listitem>
856    <para>This command makes YAZ client wait for a number of
857     response packages from target. If <replaceable>number</replaceable> is
858     omitted, 1 is assumed. 
859    </para>
860    <para>This command is rarely used and is only useful if command
861     <link linkend="command-set-auto-wait">
862      <literal>set_auto_wait</literal>
863     </link> is set to off.
864    </para>
865   </listitem>
866  </varlistentry>
867
868  <varlistentry id="command-xmles"><term>
869    <literal>xmles</literal>
870    <replaceable>OID</replaceable>
871    <replaceable>doc</replaceable>
872   </term>
873   <listitem>
874    <para>Sends XML Extended Services request using the OID and doc given.
875    </para>
876   </listitem>
877  </varlistentry>
878
879  <varlistentry><term>
880    <literal>zversion</literal>
881    <replaceable>ver</replaceable>
882   </term>
883   <listitem>
884    <para>This command sets Z39.50 version for negotiation. 
885     Should be used before 
886     <link linkend="command-open"><literal>open</literal></link>.
887     By default 3 (version 3) is used.
888    </para>
889   </listitem>
890  </varlistentry>
891
892  <varlistentry><term>
893    <literal>options</literal>
894    <replaceable>op1 op2..</replaceable>
895   </term>
896   <listitem>
897    <para>This command sets Z39.50 options for negotiation. 
898     Should be used before 
899    <link linkend="command-open"><literal>open</literal></link>.
900    </para>
901    <para>
902     The following options are supported:
903     <literal>search</literal>,  
904     <literal>present</literal>,  
905     <literal>delSet</literal>,  
906     <literal>resourceReport</literal>,  
907     <literal>triggerResourceCtrl</literal>,  
908     <literal>resourceCtrl</literal>,  
909     <literal>accessCtrl</literal>,  
910     <literal>scan</literal>,  
911     <literal>sort</literal>,  
912     <literal>extendedServices</literal>,  
913     <literal>level_1Segmentation</literal>,  
914     <literal>level_2Segmentation</literal>,  
915     <literal>concurrentOperations</literal>,  
916     <literal>namedResultSets</literal>,  
917     <literal>encapsulation</literal>,  
918     <literal>resultCount</literal>,  
919     <literal>negotiationModel</literal>,  
920     <literal>duplicationDetection</literal>,  
921     <literal>queryType104</literal>,  
922     <literal>pQESCorrection</literal>,  
923     <literal>stringSchema</literal>.
924    </para>
925   </listitem>
926  </varlistentry>
927  
928 </variablelist>
929 <!-- Keep this Emacs mode comment at the end of the file
930 Local variables:
931 mode: nxml
932 End:
933 -->
934
935
936    </refsect1>
937   <refsect1><title>FILES</title>
938    <para>
939     <filename>yaz-&lt;version&gt;/client/client.c</filename>
940    </para>
941    <para>
942     <filename>.yazclientrc</filename>
943    </para>
944    <para>
945     <filename>$HOME/.yazclientrc</filename>
946    </para>
947   </refsect1>
948   <refsect1><title>SEE ALSO</title>
949    <para>
950     <citerefentry>
951      <refentrytitle>yaz</refentrytitle>
952      <manvolnum>7</manvolnum>
953     </citerefentry>
954    </para>
955    <para>
956     Section "The YAZ Client" in the YAZ manual.
957    </para>
958    <para id="PQF">
959     Section "Prefix Query Format" in the YAZ manual.
960    </para>
961    <para id="CCL">
962     Section "Common Command Language" in the YAZ manual.
963    </para>
964    <para id="CQL">
965     Section "Common Query Language" in the YAZ manual.
966    </para>
967   </refsect1>
968 </refentry>
969 <!-- Keep this Emacs mode comment at the end of the file
970 Local variables:
971 mode: nxml
972 End:
973 -->