Removed line for PQF grammar
[yaz-moved-to-github.git] / doc / client.xml
index dede72e..48c699d 100644 (file)
@@ -1,12 +1,11 @@
-<!-- $Id: client.xml,v 1.9 2002-01-28 09:25:08 adam Exp $ -->
+<!-- $Id: client.xml,v 1.13 2002-08-17 07:55:51 adam Exp $ -->
  <chapter id="client"><title>The YAZ client</title>
   <sect1 id="client.introduction"><title>Introduction</title>
    <para>
     yaz-client is a line-mode Z39.50 client. It supports a fair amount
-    of the functionality of the Z39.50-1995 standard, but some things you
-    need to enable or disable by re-compilation.
-    Its primary purpose is to exercise the
-    package, and verify that the protocol works OK.
+    of the functionality of the Z39.50-1995 standard
+    Its primary purpose is to exercise the package, and verify that
+    the protocol works OK.
     For the same reason some commands offers more functionality than others.
     Commands that exercises common Z39.50 services such as search and present
     have more features than less common supported services, such as Extended
    <para>
     It can be started by typing
    </para>
-   <screen>
-     yaz-client [<replaceable>options</replaceable>] [<replaceable>zurl</replaceable>]
-   </screen>
+   <cmdsynopsis>
+    <command>yaz-client</command>
+    <arg>-m <replaceable>fname</replaceable></arg>
+    <arg>-a <replaceable>fname</replaceable></arg>
+    <arg>-c <replaceable>fname</replaceable></arg>
+    <arg>-v <replaceable>level</replaceable></arg>
+    <arg>-p <replaceable>target</replaceable></arg>
+    <arg>-u <replaceable>auth</replaceable></arg>
+    <arg>-k <replaceable>size</replaceable></arg>
+    <arg>zurl</arg>
+   </cmdsynopsis>
+   
    <simpara>
     in a UNIX shell / WIN32 console. The <replaceable>zurl</replaceable>,
     specifies a Z39.50 host and, if specified, the client first tries to
     establish connection with the Z39.50 target on the host.
-    Options are, as usual, are prefixed by <literal>-</literal> followed
-    by a particular letter.
+    Options are prefixed by <literal>-</literal> followed by a
+    particular letter.
     </simpara>
    <simpara>
     The following options are supported:
     <varlistentry><term>
       <literal>-m</literal> <replaceable>fname</replaceable>
      </term><listitem>
-      <simpara>ISO2709 records are appended to file
-       <replaceable>fname</replaceable>. All records as returned by a target(s)
-       in Search Responses and Present Responses are appended verbatim to 
-       the file.
+      <simpara>All retrieved transfer records are appended to file
+       <replaceable>fname</replaceable>. All records as returned by a
+       target(s) in Search Responses and Present Responses are appended
+       verbatim to the file.
       </simpara></listitem>
     </varlistentry>
     <varlistentry><term>
        <literal>debug</literal>,
        <literal>warn</literal>,
        <literal>log</literal>,
+       <literal>malloc</literal>,
        <literal>all</literal>,
        <literal>none</literal>.
       </simpara></listitem>
     </varlistentry>
-
     <varlistentry><term>
       <literal>-p</literal> <replaceable>target</replaceable>
      </term><listitem>
       <simpara>Specifies proxy address. When set YAZ client will
        connect to a proxy on the address and port given. 
-       The actual target will be specifed as part of the InitRequest
+       The actual target will be specified as part of the InitRequest
        to inform the proxy about actual target.
       </simpara></listitem>
     </varlistentry>
-
     <varlistentry><term>
-      <literal>-u</literal> <replaceable>authentication</replaceable>
+      <literal>-u</literal> <replaceable>auth</replaceable>
      </term><listitem>
       <simpara>Specifies authentication. Usually the form
        <replaceable>user</replaceable>/<replaceable>password</replaceable>
       </simpara></listitem>
     </varlistentry>
 
+    <varlistentry><term>
+      <literal>-k</literal> <replaceable>size</replaceable>
+     </term><listitem>
+      <simpara>Specifies the maximum messages size in kilobytes.
+       The default maximum messages for the YAZ client is 1024
+       (1 MB).
+      </simpara></listitem>
+    </varlistentry>
+
    </variablelist>
    <para>
     In order to connect to Index Data's test Z39.50 server on
    <screen>
     yaz-client -a - localhost
    </screen>
+   <para>
+    The following command connects to a local server via UNIX
+    socket <filename>/tmp/yaz</filename> and sets maximum message size to
+    5 MB.
+    </para>
+   <screen>
+    yaz-client -k 5120 unix:/tmp/yaz
+    </screen>
   </sect1>
   <sect1 id="client.commands"><title>Commands</title>
    <para>
     <varlistentry><term>
       <literal>open </literal><replaceable>zurl</replaceable>
      </term>
-     <term><literal>o</literal></term>
      <listitem>
       <para>Opens a connection to a server. The syntax for
        <replaceable>zurl</replaceable> is the same as described
        Syntax:
       </para>
       <para>
-       [<literal>(tcp|ssl)':'</literal>]<replaceable>host</replaceable>
-       [:<replaceable>port</replaceable>][/<replaceable>base&gt</replaceable>]
+       [<literal>(tcp|ssl|unix)':'</literal>]<replaceable>host</replaceable>
+       [:<replaceable>port</replaceable>][/<replaceable>base&gt;</replaceable>]
       </para>
      </listitem>
     </varlistentry>
     <varlistentry><term>
       <literal>quit</literal>
      </term>
-     <term><literal>q</literal></term>
      <listitem>
       <para>Ends YAZ client</para>
      </listitem>
      <listitem>
       <para>Executes list of commands from
        file <replaceable>filename</replaceable>, just like source on
-       some UNIX shells.
+       most UNIX shells.
       </para>
      </listitem>
     </varlistentry>
      </listitem>
     </varlistentry>
 
+    <varlistentry><term>
+      <literal>push_commande</literal>
+      <replaceable>command</replaceable>
+     </term>
+     <listitem>
+      <para>The push_command takes another command as its argument.
+       That command is then added to the history information (so
+       you can retrieve it later). The command itself is not
+       executed. This command only works if you have GNU readline/history
+       enabled.
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry><term>
+      <literal>set_apdufile</literal>
+      <replaceable>filename</replaceable>
+     </term>
+     <listitem>
+      <para>Sets that APDU should be logged to file
+       <replaceable>filename</replaceable>. This command does the
+       thing as option <literal>-a</literal>.
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry><term>
+      <literal>set_marcdump</literal>
+      <replaceable>filename</replaceable>
+     </term>
+     <listitem>
+      <para>Specifies that all retrieved records should be appended ot
+       file <replaceable>filename</replaceable>. This command does the
+       thing as option <literal>-m</literal>.
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry><term>
+      <literal>set_cclfields</literal>
+      <replaceable>filename</replaceable>
+     </term>
+     <listitem>
+      <para>Specifies that CCL fields should be read from file
+       file <replaceable>filename</replaceable>. This command does the
+       thing as option <literal>-c</literal>.
+      </para>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry><term>
+      <literal>register_oid</literal>
+      <replaceable>name</replaceable>
+      <replaceable>class</replaceable>
+      <replaceable>OID</replaceable>
+     </term>
+     <listitem>
+      <para>This command allows you to register your own object
+       identifier - so that instead of entering a long dot-notation
+       you can use a short name instead.
+       The <replaceable>name</replaceable> is your
+       name for the OID, <replaceable>class</replaceable> is the
+       class, and <replaceable>OID</replaceable> is the raw OID in
+       dot notation. Class is one <literal>appctx</literal>,
+       <literal>absyn</literal>, <literal>attet</literal>,
+       <literal>transyn</literal>, <literal>diagset</literal>,
+       <literal>recsyn</literal>, <literal>resform</literal>,
+       <literal>accform</literal>, <literal>extserv</literal>,
+       <literal>userinfo</literal>, <literal>elemspec</literal>,
+       <literal>varset</literal>, <literal>schema</literal>,
+       <literal>tagset</literal>, <literal>general</literal>.
+       If you're in doubt use the <literal>general</literal>
+        class.
+      </para>
+     </listitem>
+    </varlistentry>
+
    </variablelist>
   </sect1>
   <sect1 id="client.searching"><title>Searching</title>