UNPKG

node-zoom

Version:
560 lines (559 loc) 36.5 kB
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>yaz-client</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="reference.html" title="Reference"><link rel="prev" href="reference.html" title="Reference"><link rel="next" href="yaz-ztest.html" title="yaz-ztest"></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">yaz-client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="reference.html">Prev</a></td><th width="60%" align="center">Reference</th><td width="20%" align="right"><a accesskey="n" href="yaz-ztest.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="yaz-client"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>yaz-client &#8212; Z39.50/SRU client for implementors</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">yaz-client</code> [<code class="option">-a <em class="replaceable"><code>apdulog</code></em></code>] [<code class="option">-b <em class="replaceable"><code>berdump</code></em></code>] [<code class="option">-c <em class="replaceable"><code>cclfile</code></em></code>] [<code class="option">-d <em class="replaceable"><code>dump</code></em></code>] [<code class="option">-f <em class="replaceable"><code>cmdfile</code></em></code>] [<code class="option">-k <em class="replaceable"><code>size</code></em></code>] [<code class="option">-m <em class="replaceable"><code>marclog</code></em></code>] [<code class="option">-p <em class="replaceable"><code>proxy-addr</code></em></code>] [<code class="option">-q <em class="replaceable"><code>cqlfile</code></em></code>] [<code class="option">-t <em class="replaceable"><code>dispcharset</code></em></code>] [<code class="option">-u <em class="replaceable"><code>auth</code></em></code>] [<code class="option">-v <em class="replaceable"><code>loglevel</code></em></code>] [<code class="option">-V</code>] [<code class="option">-x</code>] [server-addr]</p></div></div><div class="refsect1"><a name="idp51512464"></a><h2>DESCRIPTION</h2><p> <span class="command"><strong>yaz-client</strong></span> is a <a class="ulink" href="http://www.loc.gov/z3950/agency/" target="_top">Z39.50</a>/<a class="ulink" href="http://www.loc.gov/standards/sru/" target="_top">SRU</a> client (origin) with a simple command line interface that allows you to test behavior and performance of Z39.50 targets and SRU servers. </p><p> From YAZ version 4.1.0 <span class="command"><strong>yaz-client</strong></span> may also operate as a <a class="ulink" href="http://lucene.apache.org/solr/" target="_top">Solr</a> Web Service client. </p><p> If the <em class="replaceable"><code>server-addr</code></em> is specified, the client creates a connection to the Z39.50/SRU target at the address given. </p><p> When <span class="command"><strong>yaz-client</strong></span> is started it tries to read commands from one of the following files: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Command file if it is given by option -f. </p></li><li class="listitem"><p> <code class="filename">.yazclientrc</code> in current working directory. </p></li><li class="listitem"><p> <code class="filename">.yazclientrc</code> in the user's home directory. The value of the <code class="literal">HOME</code> is used to determine the home directory. Normally, <code class="literal">HOME</code> is only set on POSIX systems such as Linux, FreeBSD, Solaris. </p></li></ul></div><p> </p></div><div class="refsect1"><a name="idp51524784"></a><h2>OPTIONS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-a <em class="replaceable"><code>filename</code></em></span></dt><dd><p> If specified, logging of protocol packages will be appended file given. If <em class="replaceable"><code>filename</code></em> is specified as <code class="literal">-</code>, the output is written to <code class="literal">stdout</code>. </p></dd><dt><span class="term">-b <em class="replaceable"><code>filename</code></em></span></dt><dd><p> If specified, YAZ will dump BER data in readable notation to the file specified. If <em class="replaceable"><code>filename</code></em> is specified as <code class="literal">-</code> the output is written to <code class="literal">stdout</code>. </p></dd><dt><span class="term">-c <em class="replaceable"><code>filename</code></em></span></dt><dd><p> If specified, CCL configuration will be read from the file given. </p></dd><dt><span class="term">-d <em class="replaceable"><code>dump</code></em></span></dt><dd><p> If specified, YAZ will dump BER data for all PDUs sent and received to individual files, named <em class="replaceable"><code>dump</code></em>.DDD.<code class="literal">raw</code>, where DDD is 001, 002, 003, .. </p></dd><dt><span class="term">-f <em class="replaceable"><code>cmdfile</code></em></span></dt><dd><p> Reads commands from <em class="replaceable"><code>cmdfile</code></em>. When this option is used, YAZ client does not read .yazclientrc from current directory or home directory. </p></dd><dt><span class="term">-k <em class="replaceable"><code>size</code></em></span></dt><dd><p> Sets preferred messages and maximum record size for Initialize Request in kilobytes. Default value is 65536 (64 MB). </p></dd><dt><span class="term">-m <em class="replaceable"><code>filename</code></em></span></dt><dd><p> If specified, retrieved records will be appended to the file given. </p></dd><dt><span class="term">-p <em class="replaceable"><code>proxy-addr</code></em></span></dt><dd><p> If specified, the client will use the proxy at the address given. YAZ client will connect to a proxy on the address and port given. The actual target will be specified as part of the InitRequest to inform the proxy about actual target. </p></dd><dt><span class="term">-q <em class="replaceable"><code>filename</code></em></span></dt><dd><p> If specified, CQL configuration will be read from the file given. </p></dd><dt><span class="term">-t <em class="replaceable"><code>displaycharset</code></em></span></dt><dd><p> If displaycharset is given, it specifies name of the character set of the output (on the terminal on which YAZ client is running). </p></dd><dt><span class="term">-u <em class="replaceable"><code>auth</code></em></span></dt><dd><p> If specified, the <em class="replaceable"><code>auth</code></em> string will be used for authentication. </p></dd><dt><span class="term"> <code class="literal">-v</code> <em class="replaceable"><code>level</code></em> </span></dt><dd>Sets the LOG level to <em class="replaceable"><code>level</code></em>. Level is a sequence of tokens separated by comma. Each token is a integer or a named LOG item - one of <code class="literal">fatal</code>, <code class="literal">debug</code>, <code class="literal">warn</code>, <code class="literal">log</code>, <code class="literal">malloc</code>, <code class="literal">all</code>, <code class="literal">none</code>. </dd><dt><span class="term">-V</span></dt><dd><p> Prints YAZ version. </p></dd><dt><span class="term">-x</span></dt><dd><p> Makes the YAZ client print hex dumps of packages sent and received on standard output. </p></dd></dl></div></div><div class="refsect1"><a name="idp51561136"></a><h2>COMMANDS</h2><p> The YAZ client accepts the following commands. </p><div class="variablelist"><dl class="variablelist"><dt><a name="command-open"></a><span class="term"> <code class="literal">open </code><em class="replaceable"><code>zurl</code></em> </span></dt><dd><p>Opens a connection to a server. The syntax for <em class="replaceable"><code>zurl</code></em> is the same as described above for connecting from the command line. </p><p> Syntax: </p><p> [<code class="literal">(tcp|ssl|unix|http)':'</code>]<em class="replaceable"><code>host</code></em> [:<em class="replaceable"><code>port</code></em>][/<em class="replaceable"><code>base</code></em>] </p></dd><dt><span class="term"> <code class="literal">quit</code> </span></dt><dd><p>Quits YAZ client</p></dd><dt><a name="command-find"></a><span class="term"> <code class="literal">find </code><em class="replaceable"><code>query</code></em></span></dt><dd><p>Sends a Search Request using the <em class="replaceable"><code>query</code></em> given. By default the query is assumed to be PQF. See command <a class="link" href="yaz-client.html#command-querytype">querytype</a> for more information. </p></dd><dt><span class="term"> <code class="literal">delete</code> <em class="replaceable"><code>setname</code></em></span></dt><dd><p>Deletes result set with name <em class="replaceable"><code>setname</code></em> on the server.</p></dd><dt><span class="term"> <code class="literal">base </code><em class="replaceable"><code>base1</code></em> <em class="replaceable"><code>base2</code></em> ... </span></dt><dd><p>Sets the name(s) of the database(s) to search. One or more databases may be specified separated by blanks. This commands overrides the database given in <em class="replaceable"><code>zurl</code></em>. </p></dd><dt><span class="term"> <code class="literal">show </code> [<em class="replaceable"><code>start</code></em>[+<em class="replaceable"><code>number</code></em>]] </span></dt><dd><p>Fetches records by sending a Present Request from the start position given by <em class="replaceable"><code>start</code></em> a number of records given by <em class="replaceable"><code>number</code></em>. If <em class="replaceable"><code>start</code></em> is not given, then the client will fetch from position of the last retrieved record plus 1. If <em class="replaceable"><code>number</code></em> is not given, then one record will be fetched at a time. </p></dd><dt><span class="term"> <code class="literal">scan</code> <em class="replaceable"><code>term</code></em> </span></dt><dd><p class="simpara">Scans database index for a term. The syntax resembles the syntax for <a class="link" href="yaz-client.html#command-find"><code class="literal">find</code></a>. If you want to scan for the word <code class="literal">water</code> you could write </p><pre class="screen"> scan water </pre><p class="simpara"> but if you want to scan only in, say the title field, you would write </p><pre class="screen"> scan @attr 1=4 water </pre></dd><dt><span class="term"> <code class="literal">setscan</code> <em class="replaceable"><code>set</code></em> <em class="replaceable"><code>term</code></em> </span></dt><dd>Scans database index for a term within a result set. This is similar to the scan command but has a result set as its first argument. </dd><dt><span class="term"> <code class="literal">scanpos</code> <em class="replaceable"><code>pos</code></em> </span></dt><dd> Sets preferred position for scan. This value is used in next scan. By default position is 1. </dd><dt><span class="term"> <code class="literal">scansize</code> <em class="replaceable"><code>size</code></em> </span></dt><dd> Sets number of entries to be returned by scan. Default number of entries is 20. </dd><dt><span class="term"> <code class="literal">scanstep</code> <em class="replaceable"><code>step</code></em> </span></dt><dd> Set step-size for scan. This value is used in next scan sent to the target. By default step-size is 0. </dd><dt><a name="sortspec"></a><span class="term"> <code class="literal">sort</code> <em class="replaceable"><code>sortspecs</code></em> </span></dt><dd><p>Sorts a result set. The sort command takes a sequence of space-separated sort specifications, with each sort specification consisting of two space-separated words (so that the whole specification list is made up of an even number of words). The first word of each specification holds a field (sort criterion) and the second holds flags. If the sort criterion includes <code class="literal">=</code> it is assumed that the <code class="literal">SortKey</code> is of type <code class="literal">sortAttributes</code> using Bib-1: in this case the integer before <code class="literal">=</code> is the attribute type and the integer following <code class="literal">=</code> is the attribute value. If no <code class="literal">=</code> character is in the criterion, it is treated as a sortfield of type InternationalString. The flags word of each sort specification must consist of <code class="literal">s</code> for case sensitive or <code class="literal">i</code> for case insensitive, and <code class="literal">&lt;</code> for ascending order or <code class="literal">&gt;</code> for descending order. </p></dd><dt><span class="term"> <code class="literal">sort+</code> </span></dt><dd><p>Same as <code class="literal">sort</code> but stores the sorted result set in a new result set. </p></dd><dt><span class="term"> <code class="literal">authentication</code> <em class="replaceable"><code>openauth</code></em> </span></dt><dd><p>Sets up a authentication string if a server requires authentication (v2 OpenStyle). The authentication string is first sent to the server when the <a class="link" href="yaz-client.html#command-open"><code class="literal">open</code></a> command is issued and the Z39.50 Initialize Request is sent, so this command must be used before <code class="literal">open</code> in order to be effective. A common convention for the <em class="replaceable"><code>authopen</code></em> string is that the username - and password is separated by a slash, e.g. <code class="literal">myusername/mysecret</code>. </p></dd><dt><span class="term"> <code class="literal">sru</code> <em class="replaceable"><code>method</code></em> <em class="replaceable"><code>version</code></em> </span></dt><dd><p>Selects Web Service method and version. Must be one of <code class="literal">post</code>, <code class="literal">get</code>, <code class="literal">soap</code> (default) or <code class="literal">solr</code>. Version should be either 1.1, 1.2 or 2.0 for SRU. Other versions are allowed - for testing purposes (version negotiation with SRU server). The version is currently not used for Solr Web Services </p></dd><dt><span class="term"> <code class="literal">list_all</code> </span></dt><dd><p>This command displays status and values for many settings. </p></dd><dt><span class="term"> <code class="literal">lslb</code> <em class="replaceable"><code>n</code></em> </span></dt><dd><p>Sets the limit for when no records should be returned together with the search result. See the <a class="ulink" href="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6" target="_top"> Z39.50 standard on set bounds </a> for more details. </p></dd><dt><span class="term"> <code class="literal">ssub</code> <em class="replaceable"><code>n</code></em> </span></dt><dd><p>Sets the limit for when all records should be returned with the search result. See the <a class="ulink" href="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6" target="_top"> Z39.50 standard on set bounds </a> for more details. </p></dd><dt><span class="term"> <code class="literal">mspn</code> <em class="replaceable"><code>n</code></em> </span></dt><dd><p>Sets the number of records should be returned if the number of records in the result set is between the values of <code class="literal">lslb</code> and <code class="literal">ssub</code>. See the <a class="ulink" href="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6" target="_top"> Z39.50 standard on set bounds </a> for more details. </p></dd><dt><span class="term"> <code class="literal">status</code> </span></dt><dd><p>Displays the values of <code class="literal">lslb</code>, <code class="literal">ssub</code> and <code class="literal">mspn</code>. </p></dd><dt><span class="term"> <code class="literal">setname</code> </span></dt><dd><p>Switches named result sets on and off. Default is on. </p></dd><dt><span class="term"> <code class="literal">cancel</code> </span></dt><dd><p>Sends a Trigger Resource Control Request to the target. </p></dd><dt><span class="term"> <code class="literal">format</code> <em class="replaceable"><code>oid</code></em> </span></dt><dd><p>Sets the preferred transfer syntax for retrieved records. yaz-client supports all the record syntaxes that currently are registered. See <a class="ulink" href="http://www.loc.gov/z3950/agency/defns/oids.html#5" target="_top"> Z39.50 Record Syntax Identifiers </a> for more details. Commonly used records syntaxes include usmarc, sutrs and xml. </p></dd><dt><span class="term"> <code class="literal">elements</code> <em class="replaceable"><code>e</code></em> </span></dt><dd><p>Sets the element set name for the records. Many targets support element sets are B (for brief) and F (for full). </p></dd><dt><span class="term"> <code class="literal">close</code> </span></dt><dd><p>Sends a Z39.50 Close APDU and closes connection with the peer </p></dd><dt><a name="command-querytype"></a><span class="term"> <code class="literal">querytype</code> <em class="replaceable"><code>type</code></em> </span></dt><dd><p>Sets the query type as used by command <a class="link" href="yaz-client.html#command-find"><code class="literal">find</code></a>. The following is supported: <code class="literal">prefix</code> for <a class="link" href="tools.html#PQF" title="1.1.�Prefix Query Format">Prefix Query Notation</a> (Type-1 Query); <code class="literal">ccl</code> for CCL search (Type-2 Query), <code class="literal">cql</code> for CQL (Type-104 search with CQL OID), <code class="literal">ccl2rpn</code> for <a class="link" href="tools.html#CCL" title="1.2.�CCL">CCL</a> to RPN conversion (Type-1 Query). <code class="literal">cql2rpn</code> for CQL to RPN conversion (Type-1 Query). </p></dd><dt><span class="term"> <code class="literal">attributeset</code> <em class="replaceable"><code>set</code></em> </span></dt><dd><p> Sets attribute set OID for prefix queries (RPN, Type-1). </p></dd><dt><span class="term"> <code class="literal">refid</code> <em class="replaceable"><code>id</code></em> </span></dt><dd><p>Sets reference ID for Z39.50 Request(s). </p></dd><dt><span class="term"> <code class="literal">itemorder</code> <em class="replaceable"><code>type</code></em> <em class="replaceable"><code>no</code></em> </span></dt><dd><p>Sends an Item Order Request using the ILL External. <em class="replaceable"><code>type</code></em> is either 1 or 2 which corresponds to ILL-Profile 1 and 2 respectively. The <em class="replaceable"><code>no</code></em> is the Result Set position of the record to be ordered. </p></dd><dt><span class="term"> <code class="literal">update</code> <em class="replaceable"><code>action</code></em> <em class="replaceable"><code>recid</code></em> <em class="replaceable"><code>doc</code></em> </span></dt><dd><p>Sends Item Update Request. The <em class="replaceable"><code>action</code></em> argument must be the action type: one of <code class="literal">insert</code>, <code class="literal">replace</code>, <code class="literal">delete</code> and <code class="literal">update</code>. The second argument, <em class="replaceable"><code>recid</code></em>, is the record identifier (any string). Third argument which is optional is the record document for the request. If doc is preceded with "&lt;", then the following characters are treated as a filename with the records to be updated. Otherwise doc is treated as a document itself. The doc may also be quited in double quotes. If doc is omitted, the last received record (as part of present response or piggybacked search response) is used for the update. </p></dd><dt><span class="term"> <code class="literal">source</code> <em class="replaceable"><code>filename</code></em> </span></dt><dd><p>Executes list of commands from file <em class="replaceable"><code>filename</code></em>, just like source on most UNIX shells. A single dot (<code class="literal">.</code>) can be used as an alternative. </p></dd><dt><span class="term"> <code class="literal">!</code> <em class="replaceable"><code>args</code></em> </span></dt><dd><p>Executes command <em class="replaceable"><code>args</code></em> in subshell using the <code class="literal">system</code> call. </p></dd><dt><span class="term"> <code class="literal">push_command</code> <em class="replaceable"><code>command</code></em> </span></dt><dd><p>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. </p></dd><dt><span class="term"> <code class="literal">set_apdufile</code> <em class="replaceable"><code>filename</code></em> </span></dt><dd><p>Sets that APDU should be logged to file <em class="replaceable"><code>filename</code></em>. Another way to achieve APDU log is by using command-line option <code class="literal">-a</code>. </p></dd><dt><span class="term"> <code class="literal">set_auto_reconnect</code> <em class="replaceable"><code>flag</code></em> </span></dt><dd><p>Specifies whether YAZ client automatically reconnect if target closes connection (Z39.50 only). </p><p> <em class="replaceable"><code>flag</code></em> must be either <code class="literal">on</code> or <code class="literal">off</code>. </p></dd><dt><a name="command-set-auto-wait"></a><span class="term"> <code class="literal">set_auto_wait</code> <em class="replaceable"><code>flag</code></em> </span></dt><dd><p>Specifies whether YAZ client should wait for response protocol packages after a request. By default YAZ client waits (on) for response packages immediately after a command (find, show) has been issued. If <code class="literal">off</code> is used, YAZ client does not attempt to receive packages automatically. These will have to be manually received when command <a class="link" href="yaz-client.html#command-wait-response"> <code class="literal">wait_response</code> </a> is used. </p><p> <em class="replaceable"><code>flag</code></em> must be either <code class="literal">on</code> or <code class="literal">off</code>. </p></dd><dt><span class="term"> <code class="literal">set_marcdump</code> <em class="replaceable"><code>filename</code></em> </span></dt><dd><p>Specifies that all retrieved records should be appended to file <em class="replaceable"><code>filename</code></em>. This command does the thing as option <code class="literal">-m</code>. </p></dd><dt><span class="term"> <code class="literal">schema</code> <em class="replaceable"><code>schemaid</code></em> </span></dt><dd><p>Specifies schema for retrieval. Schema may be specified as an OID for Z39.50. For SRU, schema is a simple string URI. </p></dd><dt><a name="command-charset"></a><span class="term"> <code class="literal">charset</code> <em class="replaceable"><code>negotiationcharset</code></em> [<em class="replaceable"><code>displaycharset</code></em>] [[<em class="replaceable"><code>marccharset</code></em>]] </span></dt><dd><p>Specifies character set (encoding) for Z39.50 negotiation / SRU encoding and/or character set for output (terminal). </p><p> <em class="replaceable"><code>negotiationcharset</code></em> is the name of the character set to be negotiated by the server. The special name <code class="literal">-</code> for <em class="replaceable"><code>negotiationcharset</code></em> specifies <span class="emphasis"><em>no</em></span> character set to be negotiated. </p><p> If <em class="replaceable"><code>displaycharset</code></em> is given, it specifies name of the character set of the output (on the terminal on which YAZ client is running). To disable conversion of characters to the output encoding, the special name <code class="literal">-</code> (dash) can be used. If the special name <code class="literal">auto</code> is given, YAZ client will convert strings to the encoding of the terminal as returned by <code class="function">nl_langinfo</code> call. </p><p> If <em class="replaceable"><code>marcharset</code></em> is given, it specifies name of the character set of retrieved MARC records from server. See also <code class="literal">marcharset</code> command. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Since character set negotiation takes effect in the Z39.50 Initialize Request you should issue this command before command <a class="link" href="yaz-client.html#command-open"><code class="literal">open</code></a> is used. </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> MARC records are not covered by Z39.50 character set negotiation, so that's why there is a separate character that must be known in order to do meaningful conversion(s). </p></div></dd><dt><span class="term"> <code class="literal">negcharset</code> <em class="replaceable"><code>charset</code></em> </span></dt><dd><p>Specifies character set for negotiation (Z39.50). The argument is the same as second argument for command <a class="link" href="yaz-client.html#command-charset"><code class="literal">charset</code></a>. </p></dd><dt><span class="term"> <code class="literal">displaycharset</code> <em class="replaceable"><code>charset</code></em> </span></dt><dd><p>Specifies character set for output (display). The argument is the same as second argument for command <a class="link" href="yaz-client.html#command-charset"><code class="literal">charset</code></a>. </p></dd><dt><span class="term"> <code class="literal">marccharset</code> <em class="replaceable"><code>charset</code></em> </span></dt><dd><p>Specifies character set for retrieved MARC records so that YAZ client can display them in a character suitable for your display. See <code class="literal">charset</code> command. If <code class="literal">auto</code> is given, YAZ will assume that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1 for all other MARC variants. The charset argument is the same as third argument for command <a class="link" href="yaz-client.html#command-charset"><code class="literal">charset</code></a>. </p></dd><dt><span class="term"> <code class="literal">querycharset</code> <em class="replaceable"><code>charset</code></em> </span></dt><dd><p>Specifies character set for query terms for Z39.50 RPN queries and Z39.50 Scan Requests (termListAndStartPoint). This is a pure client-side conversion which converts from displayCharset to queryCharset. </p></dd><dt><span class="term"> <code class="literal">set_cclfile</code> <em class="replaceable"><code>filename</code></em> </span></dt><dd><p>Specifies that CCL fields should be read from file file <em class="replaceable"><code>filename</code></em>. This command does the thing as option <code class="literal">-c</code>. </p></dd><dt><span class="term"> <code class="literal">set_cqlfile</code> <em class="replaceable"><code>filename</code></em> </span></dt><dd><p>Specifies that CQL fields should be read from file file <em class="replaceable"><code>filename</code></em>. This command does the thing as option <code class="literal">-q</code>. </p></dd><dt><span class="term"> <code class="literal">register_oid</code> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>class</code></em> <em class="replaceable"><code>OID</code></em> </span></dt><dd><p>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 <em class="replaceable"><code>name</code></em> is your name for the OID, <em class="replaceable"><code>class</code></em> is the class, and <em class="replaceable"><code>OID</code></em> is the raw OID in dot notation. Class is one <code class="literal">appctx</code>, <code class="literal">absyn</code>, <code class="literal">attet</code>, <code class="literal">transyn</code>, <code class="literal">diagset</code>, <code class="literal">recsyn</code>, <code class="literal">resform</code>, <code class="literal">accform</code>, <code class="literal">extserv</code>, <code class="literal">userinfo</code>, <code class="literal">elemspec</code>, <code class="literal">varset</code>, <code class="literal">schema</code>, <code class="literal">tagset</code>, <code class="literal">general</code>. If you're in doubt use the <code class="literal">general</code> class. </p></dd><dt><span class="term"> <code class="literal">register_tab</code> <em class="replaceable"><code>command</code></em> <em class="replaceable"><code>string</code></em> </span></dt><dd><p>This command registers a TAB completion string for the command given. </p></dd><dt><span class="term"> <code class="literal">sleep</code> <em class="replaceable"><code>seconds</code></em> </span></dt><dd><p>This command makes YAZ client sleep (be idle) for the number of seconds given. </p></dd><dt><a name="command-wait-response"></a><span class="term"> <code class="literal">wait_response</code> [ <em class="replaceable"><code>number</code></em>] </span></dt><dd><p>This command makes YAZ client wait for a number of response packages from target. If <em class="replaceable"><code>number</code></em> is omitted, 1 is assumed. </p><p>This command is rarely used and is only useful if command <a class="link" href="yaz-client.html#command-set-auto-wait"> <code class="literal">set_auto_wait</code> </a> is set to off. </p></dd><dt><a name="command-xmles"></a><span class="term"> <code class="literal">xmles</code> <em class="replaceable"><code>OID</code></em> <em class="replaceable"><code>doc</code></em> </span></dt><dd><p>Sends XML Extended Services request using the OID and doc given. </p></dd><dt><span class="term"> <code class="literal">zversion</code> <em class="replaceable"><code>ver</code></em> </span></dt><dd><p>This command sets Z39.50 version for negotiation. Should be used before <a class="link" href="yaz-client.html#command-open"><code class="literal">open</code></a>. By default 3 (version 3) is used. </p></dd><dt><span class="term"> <code class="literal">options</code> <em class="replaceable"><code>op1 op2..</code></em> </span></dt><dd><p>This command sets Z39.50 options for negotiation. Should be used before <a class="link" href="yaz-client.html#command-open"><code class="literal">open</code></a>. </p><p> The following options are supported: <code class="literal">search</code>, <code class="literal">present</code>, <code class="literal">delSet</code>, <code class="literal">resourceReport</code>, <code class="literal">triggerResourceCtrl</code>, <code class="literal">resourceCtrl</code>, <code class="literal">accessCtrl</code>, <code class="literal">scan</code>, <code class="literal">sort</code>, <code class="literal">extendedServices</code>, <code class="literal">level_1Segmentation</code>, <code class="literal">level_2Segmentation</code>, <code class="literal">concurrentOperations</code>, <code class="literal">namedResultSets</code>, <code class="literal">encapsulation</code>, <code class="literal">resultCount</code>, <code class="literal">negotiationModel</code>, <code class="literal">duplicationDetection</code>, <code class="literal">queryType104</code>, <code class="literal">pQESCorrection</code>, <code class="literal">stringSchema</code>. </p></dd></dl></div></div><div class="refsect1"><a name="idp51813872"></a><h2>EXAMPLE</h2><p> The simplest example of a Prefix Query would be something like </p><pre class="screen"> f knuth </pre><p> or </p><pre class="screen"> f "donald knuth" </pre><p> In those queries no attributes was specified. This leaves it up to the server what fields to search but most servers will search in all fields. Some servers does not support this feature though, and require that some attributes are defined. To add one attribute you could do: </p><pre class="screen"> f @attr 1=4 computer </pre><p> where we search in the title field, since the use(1) is title(4). If we want to search in the author field <span class="emphasis"><em>and</em></span> in the title field, and in the title field using right truncation it could look something like this: </p><pre class="screen"> f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer </pre><p> Finally using a mix of Bib-1 and GILS attributes could look something like this: </p><pre class="screen"> f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather </pre><p> </p></div><div class="refsect1"><a name="idp51819680"></a><h2>FILES</h2><p> <code class="filename">yaz-&lt;version&gt;/client/client.c</code> </p><p> <code class="filename">$HOME/.yazclientrc</code> </p><p> <code class="filename">$HOME/.yazclient.history</code> </p></div><div class="refsect1"><a name="idp51823600"></a><h2>SEE ALSO</h2><p> <span class="citerefentry"><span class="refentrytitle">yaz</span>(7)</span> <span class="citerefentry"><span class="refentrytitle">bib1-attr</span>(7)</span> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="reference.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="yaz-ztest.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Reference�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�yaz-ztest</td></tr></table></div></body></html>