source: yaz/trunk/fuentes/doc/manref.xml @ 255

Last change on this file since 255 was 255, checked in by mabarracus, 5 years ago

added trusty code to xenial

File size: 130.7 KB
Line 
1<!--Generated by stripref.xsl . Do not edit-->
2<refentry id="yaz-client">
3 <refentryinfo>
4  <productname class="trade">YAZ</productname>
5  <productnumber>5.14.3</productnumber>
6  <info><orgname>Index Data</orgname></info>
7 </refentryinfo>
8
9 <refmeta>
10  <refentrytitle>yaz-client</refentrytitle>
11  <manvolnum>1</manvolnum>
12  <refmiscinfo class="manual">Commands</refmiscinfo>
13 </refmeta>
14
15 <refnamediv>
16  <refname>yaz-client</refname>
17  <refpurpose>Z39.50/SRU client for implementors</refpurpose>
18 </refnamediv>
19
20 <refsynopsisdiv>
21  <cmdsynopsis sepchar=" ">
22   <command moreinfo="none">yaz-client</command>
23   <arg choice="opt" rep="norepeat"><option>-a <replaceable>apdulog</replaceable></option></arg>
24   <arg choice="opt" rep="norepeat"><option>-b <replaceable>berdump</replaceable></option></arg>
25   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cclfile</replaceable></option></arg>
26   <arg choice="opt" rep="norepeat"><option>-d <replaceable>dump</replaceable></option></arg>
27   <arg choice="opt" rep="norepeat"><option>-f <replaceable>cmdfile</replaceable></option></arg>
28   <arg choice="opt" rep="norepeat"><option>-k <replaceable>size</replaceable></option></arg>
29   <arg choice="opt" rep="norepeat"><option>-m <replaceable>marclog</replaceable></option></arg>
30   <arg choice="opt" rep="norepeat"><option>-p <replaceable>proxy-addr</replaceable></option></arg>
31   <arg choice="opt" rep="norepeat"><option>-q <replaceable>cqlfile</replaceable></option></arg>
32   <arg choice="opt" rep="norepeat"><option>-t <replaceable>dispcharset</replaceable></option></arg>
33   <arg choice="opt" rep="norepeat"><option>-u <replaceable>auth</replaceable></option></arg>
34   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
35   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
36   <arg choice="opt" rep="norepeat"><option>-x</option></arg>
37   <arg choice="opt" rep="norepeat">server-addr</arg>
38  </cmdsynopsis>
39
40 </refsynopsisdiv>
41
42 <refsect1><title>DESCRIPTION</title>
43  <para>
44   <command moreinfo="none">yaz-client</command> is a
45   <ulink url="http://www.loc.gov/z3950/agency/">Z39.50</ulink>/<ulink url="http://www.loc.gov/standards/sru/">SRU</ulink>
46   client (origin) with a simple command line interface that allows
47   you to test behavior and performance of Z39.50 targets and SRU servers.
48  </para>
49  <para>
50   From YAZ version 4.1.0 <command moreinfo="none">yaz-client</command> may also operate as a
51   <ulink url="http://lucene.apache.org/solr/">Solr</ulink> Web Service
52   client.
53  </para>
54  <para>
55   If the <replaceable>server-addr</replaceable> is specified, the client creates
56   a connection to the Z39.50/SRU target at the address given.
57  </para>
58  <para>
59   When <command moreinfo="none">yaz-client</command> is started it tries to read
60   commands from one of the following files:
61   <itemizedlist>
62    <listitem><para>
63      Command file if it is given by option -f.
64     </para></listitem>
65    <listitem><para>
66      <filename moreinfo="none">.yazclientrc</filename> in current working directory.
67     </para></listitem>
68    <listitem><para>
69      <filename moreinfo="none">.yazclientrc</filename> in the user's home directory.
70      The value of the <literal moreinfo="none">HOME</literal> is used to determine
71      the home directory. Normally, <literal moreinfo="none">HOME</literal> is only set
72      on POSIX systems such as Linux, FreeBSD, Solaris.
73     </para></listitem>
74   </itemizedlist>
75  </para>
76 </refsect1>
77  <refsect1>
78   <title>OPTIONS</title>
79   <variablelist>
80    <varlistentry>
81     <term>-a <replaceable>filename</replaceable></term>
82     <listitem><para>
83       If specified, logging of protocol packages will be appended
84       file given. If <replaceable>filename</replaceable> is
85       specified as <literal moreinfo="none">-</literal>, the output is written
86       to <literal moreinfo="none">stdout</literal>.
87      </para></listitem>
88    </varlistentry>
89    <varlistentry>
90     <term>-b <replaceable>filename</replaceable></term>
91     <listitem><para>
92       If specified, YAZ will dump BER data in readable notation
93       to the file specified. If <replaceable>filename</replaceable>
94       is specified as <literal moreinfo="none">-</literal> the output is written
95       to <literal moreinfo="none">stdout</literal>.
96      </para></listitem>
97    </varlistentry>
98    <varlistentry>
99     <term>-c <replaceable>filename</replaceable></term>
100     <listitem><para>
101       If specified, CCL configuration will be read from
102       the file given.
103      </para></listitem>
104    </varlistentry>
105    <varlistentry>
106     <term>-d <replaceable>dump</replaceable></term>
107     <listitem><para>
108       If specified, YAZ will dump BER data for all PDUs sent and received
109       to individual files, named
110       <replaceable>dump</replaceable>.DDD.<literal moreinfo="none">raw</literal>,
111       where DDD is 001, 002, 003, ..
112      </para></listitem>
113    </varlistentry>
114
115    <varlistentry>
116     <term>-f <replaceable>cmdfile</replaceable></term>
117     <listitem><para>
118      Reads commands from <replaceable>cmdfile</replaceable>. When
119      this option is used, YAZ client does not read .yazclientrc
120      from current directory or home directory.
121      </para></listitem>
122    </varlistentry>
123
124    <varlistentry>
125     <term>-k <replaceable>size</replaceable></term>
126     <listitem><para>
127      Sets preferred messages and maximum record size for Initialize
128      Request in kilobytes. Default value is 65536 (64 MB).
129      </para></listitem>
130    </varlistentry>
131    <varlistentry>
132     <term>-m <replaceable>filename</replaceable></term>
133     <listitem><para>
134       If specified, retrieved records will be appended to the file given.
135      </para></listitem>
136    </varlistentry>
137    <varlistentry>
138     <term>-p <replaceable>proxy-addr</replaceable></term>
139     <listitem><para>
140       If specified, the client will use the proxy at the address
141       given. YAZ client will
142       connect to a proxy on the address and port given.
143       The actual target will be specified as part of the InitRequest
144       to inform the proxy about actual target.
145      </para></listitem>
146    </varlistentry>
147    <varlistentry>
148     <term>-q <replaceable>filename</replaceable></term>
149     <listitem><para>
150       If specified, CQL configuration will be read from
151       the file given.
152      </para></listitem>
153    </varlistentry>
154    <varlistentry>
155     <term>-t <replaceable>displaycharset</replaceable></term>
156     <listitem><para>
157       If displaycharset is given, it specifies name of the character set of the
158       output (on the terminal on which YAZ client is running).
159      </para></listitem>
160    </varlistentry>
161    <varlistentry>
162     <term>-u <replaceable>auth</replaceable></term>
163     <listitem><para>
164       If specified, the <replaceable>auth</replaceable> string
165       will be used for authentication.
166      </para></listitem>
167    </varlistentry>
168    <varlistentry><term>
169      <literal moreinfo="none">-v</literal> <replaceable>level</replaceable>
170     </term><listitem>
171      <simpara>Sets the LOG level to <replaceable>level</replaceable>.
172       Level is a sequence of tokens separated by comma. Each token
173       is a integer or a named LOG item - one of
174       <literal moreinfo="none">fatal</literal>,
175       <literal moreinfo="none">debug</literal>,
176       <literal moreinfo="none">warn</literal>,
177       <literal moreinfo="none">log</literal>,
178       <literal moreinfo="none">malloc</literal>,
179       <literal moreinfo="none">all</literal>,
180       <literal moreinfo="none">none</literal>.
181      </simpara></listitem>
182    </varlistentry>
183    <varlistentry>
184     <term>-V</term>
185     <listitem><para>
186       Prints YAZ version.
187     </para></listitem>
188    </varlistentry>
189    <varlistentry>
190     <term>-x</term>
191     <listitem><para>
192       Makes the YAZ client print hex dumps of packages sent and received
193       on standard output.
194       </para></listitem>
195    </varlistentry>
196   </variablelist>
197  </refsect1>
198 <refsect1>
199  <title>COMMANDS</title>
200  <para>
201   The YAZ client accepts the following commands.
202  </para>
203  <variablelist>
204   <varlistentry id="command-open"><term>
205     <literal moreinfo="none">open </literal><replaceable>zurl</replaceable>
206    </term>
207    <listitem>
208     <para>Opens a connection to a server. The syntax for
209      <replaceable>zurl</replaceable> is the same as described
210      above for connecting from the command line.
211     </para>
212     <para>
213      Syntax:
214     </para>
215     <para>
216      [<literal moreinfo="none">(tcp|ssl|unix|http)':'</literal>]<replaceable>host</replaceable>
217      [:<replaceable>port</replaceable>][/<replaceable>base</replaceable>]
218     </para>
219    </listitem>
220   </varlistentry>
221   <varlistentry><term>
222     <literal moreinfo="none">quit</literal>
223    </term>
224    <listitem>
225     <para>Quits YAZ client</para>
226    </listitem>
227   </varlistentry>
228   <varlistentry id="command-find"><term>
229     <literal moreinfo="none">find </literal><replaceable>query</replaceable></term>
230    <listitem>
231     <para>Sends a Search Request using the <replaceable>query</replaceable>
232      given. By default the query is assumed to be PQF. See command
233      <link linkend="command-querytype">querytype</link> for more information.
234     </para>
235    </listitem>
236   </varlistentry>
237   <varlistentry><term>
238     <literal moreinfo="none">delete</literal> <replaceable>setname</replaceable></term>
239    <listitem>
240     <para>Deletes result set with name <replaceable>setname</replaceable>
241      on the server.</para>
242    </listitem>
243   </varlistentry>
244   <varlistentry><term>
245     <literal moreinfo="none">base </literal><replaceable>base1</replaceable>
246     <replaceable>base2</replaceable> ...
247    </term>
248    <listitem>
249     <para>Sets the name(s) of the database(s) to search. One or more
250      databases may be specified separated by blanks. This commands overrides
251      the database given in <replaceable>zurl</replaceable>.
252     </para>
253    </listitem>
254   </varlistentry>
255   <varlistentry><term>
256     <literal moreinfo="none">show </literal>
257     [<replaceable>start</replaceable>[+<replaceable>number</replaceable>]]
258    </term>
259    <listitem>
260     <para>Fetches records by sending a Present Request from the start
261      position given by
262      <replaceable>start</replaceable>
263      a number of records given by <replaceable>number</replaceable>. If
264      <replaceable>start</replaceable> is not given, then the client
265      will fetch from position of the last retrieved record plus 1. If
266      <replaceable>number</replaceable> is not given, then one record will
267      be fetched at a time.
268     </para>
269    </listitem>
270   </varlistentry>
271   <varlistentry><term>
272     <literal moreinfo="none">scan</literal> <replaceable>term</replaceable>
273    </term>
274    <listitem>
275     <simpara>Scans
276      database index for a term. The syntax resembles the syntax
277      for <link linkend="command-find"><literal moreinfo="none">find</literal></link>.
278      If you want to scan for the word <literal moreinfo="none">water</literal> you could
279      write
280     </simpara>
281     <screen format="linespecific">
282      scan water
283     </screen>
284     <simpara>
285      but if you want to scan only in, say the title field, you would write
286     </simpara>
287     <screen format="linespecific">
288      scan @attr 1=4 water
289     </screen>
290    </listitem>
291   </varlistentry>
292   <varlistentry><term>
293     <literal moreinfo="none">setscan</literal> <replaceable>set</replaceable> <replaceable>term</replaceable>
294    </term>
295    <listitem>
296     <simpara>Scans database index for a term within a result set. This
297      is similar to the scan command but has a result set as its first argument.
298     </simpara>
299    </listitem>
300   </varlistentry>
301   <varlistentry><term>
302     <literal moreinfo="none">scanpos</literal> <replaceable>pos</replaceable>
303    </term>
304    <listitem>
305     <simpara>
306      Sets preferred position for scan. This value
307      is used in next scan. By default position is 1.
308     </simpara>
309    </listitem>
310   </varlistentry>
311   <varlistentry><term>
312     <literal moreinfo="none">scansize</literal> <replaceable>size</replaceable>
313    </term>
314    <listitem>
315     <simpara>
316      Sets number of entries to be returned by scan. Default
317      number of entries is 20.
318     </simpara>
319    </listitem>
320   </varlistentry>
321   <varlistentry><term>
322     <literal moreinfo="none">scanstep</literal> <replaceable>step</replaceable>
323    </term>
324    <listitem>
325     <simpara>
326      Set step-size for scan. This value is used in next scan
327      sent to the target. By default step-size is 0.
328     </simpara>
329    </listitem>
330   </varlistentry>
331   <varlistentry id="sortspec"><term>
332     <literal moreinfo="none">sort</literal> <replaceable>sortspecs</replaceable>
333    </term>
334    <listitem>
335     <para>Sorts a result set. The sort command takes a
336      sequence of space-separated sort specifications, with each sort
337      specification consisting of two space-separated words (so that the
338      whole specification list is made up of an even number of words).
339      The first word of each specification
340      holds a field (sort criterion) and the second holds flags.
341      If the sort criterion includes <literal moreinfo="none">=</literal> it is assumed
342      that the <literal moreinfo="none">SortKey</literal> is of type
343      <literal moreinfo="none">sortAttributes</literal> using Bib-1: in this case
344      the integer before <literal moreinfo="none">=</literal> is
345      the attribute type and the integer following <literal moreinfo="none">=</literal>
346      is the attribute value.
347      If no <literal moreinfo="none">=</literal> character is in the criterion, it is treated
348      as a sortfield of type InternationalString.
349      The flags word of each sort specification must consist of
350      <literal moreinfo="none">s</literal>
351      for case sensitive or <literal moreinfo="none">i</literal> for case insensitive, and
352      <literal moreinfo="none">&lt;</literal> for ascending order or <literal moreinfo="none">&gt;</literal>
353      for descending order.
354     </para>
355    </listitem>
356   </varlistentry>
357   <varlistentry><term>
358     <literal moreinfo="none">sort+</literal>
359    </term>
360    <listitem>
361     <para>Same as <literal moreinfo="none">sort</literal> but stores the sorted
362      result set in a new result set.
363     </para>
364    </listitem>
365   </varlistentry>
366   <varlistentry><term>
367     <literal moreinfo="none">authentication</literal> <replaceable>openauth</replaceable>
368    </term>
369    <listitem>
370     <para>Sets up a authentication string if a server requires
371      authentication (v2 OpenStyle). The authentication string is first
372      sent to the server when the
373      <link linkend="command-open"><literal moreinfo="none">open</literal></link> command is
374      issued and the Z39.50 Initialize Request is sent, so this command
375      must be used before <literal moreinfo="none">open</literal> in order to be effective.
376      A common convention for the <replaceable>authopen</replaceable> string
377      is that the username - and password is separated by a slash, e.g.
378      <literal moreinfo="none">myusername/mysecret</literal>.
379     </para>
380    </listitem>
381   </varlistentry>
382
383   <varlistentry><term>
384     <literal moreinfo="none">sru</literal> <replaceable>method</replaceable> <replaceable>version</replaceable>
385    </term>
386    <listitem>
387     <para>Selects Web Service method and version.
388      Must be one of <literal moreinfo="none">post</literal>,
389      <literal moreinfo="none">get</literal>, <literal moreinfo="none">soap</literal> (default)
390      or <literal moreinfo="none">solr</literal>. Version
391      should be either 1.1, 1.2 or 2.0 for SRU.
392      Other versions are allowed - for testing
393      purposes (version negotiation with SRU server).
394      The version is currently not used for Solr Web Services
395     </para>
396    </listitem>
397   </varlistentry>
398
399   <varlistentry><term>
400     <literal moreinfo="none">list_all</literal>
401    </term>
402    <listitem>
403     <para>This command displays status and values for many settings.
404     </para>
405    </listitem>
406   </varlistentry>
407
408   <varlistentry><term>
409     <literal moreinfo="none">lslb</literal> <replaceable>n</replaceable>
410    </term>
411    <listitem>
412     <para>Sets the limit for when no records should be returned
413      together with the search result.
414      See the
415      <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
416       Z39.50 standard on set bounds
417      </ulink>
418      for more details.
419     </para>
420    </listitem>
421   </varlistentry>
422
423   <varlistentry><term>
424     <literal moreinfo="none">ssub</literal> <replaceable>n</replaceable>
425    </term>
426    <listitem>
427     <para>Sets the limit for when all records should be returned with
428      the search result.
429      See the
430      <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
431       Z39.50 standard on set bounds
432      </ulink> for more details.
433     </para>
434    </listitem>
435   </varlistentry>
436
437   <varlistentry><term>
438     <literal moreinfo="none">mspn</literal> <replaceable>n</replaceable>
439    </term>
440    <listitem>
441     <para>Sets the number of records should be returned if the
442      number of records in the result set is between the values of
443      <literal moreinfo="none">lslb</literal> and <literal moreinfo="none">ssub</literal>.
444      See the
445      <ulink url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
446       Z39.50 standard on set bounds
447      </ulink>
448      for more details.
449     </para>
450    </listitem>
451   </varlistentry>
452   <varlistentry><term>
453     <literal moreinfo="none">status</literal>
454    </term>
455    <listitem>
456     <para>Displays the values of <literal moreinfo="none">lslb</literal>,
457      <literal moreinfo="none">ssub</literal> and <literal moreinfo="none">mspn</literal>.
458     </para>
459    </listitem>
460   </varlistentry>
461   <varlistentry><term>
462     <literal moreinfo="none">setname</literal>
463    </term>
464    <listitem>
465     <para>Switches named result sets on and off. Default is on.
466     </para>
467    </listitem>
468   </varlistentry>
469   <varlistentry><term>
470     <literal moreinfo="none">cancel</literal>
471    </term>
472    <listitem>
473     <para>Sends a Trigger Resource Control Request to the target.
474     </para>
475    </listitem>
476   </varlistentry>
477   <varlistentry><term>
478     <literal moreinfo="none">format</literal> <replaceable>oid</replaceable>
479    </term>
480    <listitem>
481     <para>Sets the preferred transfer syntax for retrieved records.
482      yaz-client supports all the record syntaxes that currently
483      are registered. See
484      <ulink url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
485       Z39.50 Record Syntax Identifiers
486      </ulink>
487      for more details. Commonly used records syntaxes include usmarc,
488      sutrs and xml.
489     </para>
490    </listitem>
491   </varlistentry>
492   <varlistentry><term>
493     <literal moreinfo="none">elements</literal> <replaceable>e</replaceable>
494    </term>
495    <listitem>
496     <para>Sets the element set name for the records. Many targets support
497      element sets are B (for brief) and F (for full).
498     </para>
499    </listitem>
500   </varlistentry>
501   <varlistentry><term>
502     <literal moreinfo="none">close</literal>
503    </term>
504    <listitem>
505     <para>Sends a Z39.50 Close APDU and closes connection with the peer
506     </para>
507    </listitem>
508   </varlistentry>
509   <varlistentry id="command-querytype"><term>
510     <literal moreinfo="none">querytype</literal> <replaceable>type</replaceable>
511    </term>
512    <listitem>
513     <para>Sets the query type as used by command
514      <link linkend="command-find"><literal moreinfo="none">find</literal></link>.
515      The following is supported:
516      <literal moreinfo="none">prefix</literal> for
517      <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
518      <literal moreinfo="none">ccl</literal> for CCL search (Type-2 Query),
519      <literal moreinfo="none">cql</literal> for CQL (Type-104 search with CQL OID),
520      <literal moreinfo="none">ccl2rpn</literal> for
521      <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
522      <literal moreinfo="none">cql2rpn</literal> for
523      CQL to RPN conversion (Type-1 Query).
524     </para>
525    </listitem>
526   </varlistentry>
527   <varlistentry><term>
528     <literal moreinfo="none">attributeset</literal> <replaceable>set</replaceable>
529    </term>
530    <listitem>
531     <para>
532      Sets attribute set OID for prefix queries (RPN, Type-1).
533     </para>
534    </listitem>
535   </varlistentry>
536   <varlistentry><term>
537     <literal moreinfo="none">refid</literal> <replaceable>id</replaceable>
538    </term>
539    <listitem>
540     <para>Sets reference ID for Z39.50 Request(s).
541     </para>
542    </listitem>
543   </varlistentry>
544   <varlistentry><term>
545     <literal moreinfo="none">itemorder</literal>
546     <replaceable>type</replaceable> <replaceable>no</replaceable>
547    </term>
548    <listitem>
549     <para>Sends an Item Order Request using the ILL External.
550      <replaceable>type</replaceable> is either 1 or 2 which corresponds to
551      ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
552      is the Result Set position of the record to be ordered.
553     </para>
554    </listitem>
555   </varlistentry>
556   <varlistentry><term>
557     <literal moreinfo="none">update</literal>
558     <replaceable>action</replaceable>
559     <replaceable>recid</replaceable>
560     <replaceable>doc</replaceable>
561    </term>
562    <listitem>
563     <para>Sends Item Update Request. The <replaceable>action</replaceable>
564      argument must be the action type: one of <literal moreinfo="none">insert</literal>,
565      <literal moreinfo="none">replace</literal>, <literal moreinfo="none">delete</literal> and
566      <literal moreinfo="none">update</literal>. The second argument,
567      <replaceable>recid</replaceable>, is the
568      record identifier (any string). Third argument which is optional is
569      the record document for the request. If doc is preceded with
570      "&lt;", then the following characters are treated as a filename
571      with the records to be updated. Otherwise doc is treated as
572      a document itself. The doc may also be quited in double quotes.
573      If doc is omitted, the last received record (as part of present
574      response or piggybacked search response) is used for the update.
575     </para>
576    </listitem>
577   </varlistentry>
578
579   <varlistentry><term>
580     <literal moreinfo="none">source</literal>
581     <replaceable>filename</replaceable>
582    </term>
583    <listitem>
584     <para>Executes list of commands from
585      file <replaceable>filename</replaceable>, just like source on
586      most UNIX shells. A single dot (<literal moreinfo="none">.</literal>) can be used
587      as an alternative.
588     </para>
589    </listitem>
590   </varlistentry>
591
592   <varlistentry><term>
593     <literal moreinfo="none">!</literal>
594     <replaceable>args</replaceable>
595    </term>
596    <listitem>
597     <para>Executes command <replaceable>args</replaceable> in subshell
598      using the <literal moreinfo="none">system</literal> call.
599     </para>
600    </listitem>
601   </varlistentry>
602
603   <varlistentry><term>
604     <literal moreinfo="none">push_command</literal>
605     <replaceable>command</replaceable>
606    </term>
607    <listitem>
608     <para>The push_command takes another command as its argument.
609      That command is then added to the history information (so
610      you can retrieve it later). The command itself is not
611      executed. This command only works if you have GNU readline/history
612      enabled.
613     </para>
614    </listitem>
615   </varlistentry>
616
617   <varlistentry><term>
618     <literal moreinfo="none">set_apdufile</literal>
619     <replaceable>filename</replaceable>
620    </term>
621    <listitem>
622     <para>Sets that APDU should be logged to file
623      <replaceable>filename</replaceable>. Another way to achieve
624      APDU log is by using command-line option <literal moreinfo="none">-a</literal>.
625     </para>
626    </listitem>
627   </varlistentry>
628
629   <varlistentry><term>
630     <literal moreinfo="none">set_auto_reconnect</literal>
631     <replaceable>flag</replaceable>
632    </term>
633    <listitem>
634     <para>Specifies whether YAZ client automatically reconnect if
635      target closes connection (Z39.50 only).
636     </para>
637     <para>
638      <replaceable>flag</replaceable> must be either
639      <literal moreinfo="none">on</literal> or <literal moreinfo="none">off</literal>.
640     </para>
641    </listitem>
642   </varlistentry>
643
644   <varlistentry id="command-set-auto-wait"><term>
645     <literal moreinfo="none">set_auto_wait</literal>
646     <replaceable>flag</replaceable>
647    </term>
648    <listitem>
649     <para>Specifies whether YAZ client should wait for
650      response protocol packages after a request.
651      By default YAZ client waits (on) for response packages immediately
652      after a command (find, show) has been issued. If <literal moreinfo="none">off</literal>
653      is used, YAZ client does not attempt to receive packages automatically.
654      These will have to be manually received when command
655      <link linkend="command-wait-response">
656       <literal moreinfo="none">wait_response</literal>
657      </link> is used.
658     </para>
659     <para>
660      <replaceable>flag</replaceable> must be either
661      <literal moreinfo="none">on</literal> or <literal moreinfo="none">off</literal>.
662     </para>
663    </listitem>
664   </varlistentry>
665
666   <varlistentry><term>
667     <literal moreinfo="none">set_marcdump</literal>
668     <replaceable>filename</replaceable>
669    </term>
670    <listitem>
671     <para>Specifies that all retrieved records should be appended to
672      file <replaceable>filename</replaceable>. This command does the
673      thing as option <literal moreinfo="none">-m</literal>.
674     </para>
675    </listitem>
676   </varlistentry>
677
678   <varlistentry><term>
679     <literal moreinfo="none">schema</literal>
680     <replaceable>schemaid</replaceable>
681    </term>
682    <listitem>
683     <para>Specifies schema for retrieval.
684      Schema may be specified as an OID for Z39.50.
685      For SRU, schema is a simple string URI.
686     </para>
687    </listitem>
688   </varlistentry>
689
690   <varlistentry id="command-charset"><term>
691     <literal moreinfo="none">charset</literal>
692     <replaceable>negotiationcharset</replaceable>
693     [<replaceable>displaycharset</replaceable>]
694     [[<replaceable>marccharset</replaceable>]]
695    </term>
696    <listitem>
697     <para>Specifies character set (encoding) for Z39.50
698      negotiation / SRU encoding and/or character set for output (terminal).
699     </para>
700     <para>
701      <replaceable>negotiationcharset</replaceable> is the name
702      of the character set to be negotiated by the server. The special name
703      <literal moreinfo="none">-</literal> for <replaceable>negotiationcharset</replaceable>
704      specifies <emphasis>no</emphasis> character set to be negotiated.
705     </para>
706     <para>
707      If <replaceable>displaycharset</replaceable> is given, it specifies name
708      of the character set of the output (on the terminal on which
709      YAZ client is running). To disable conversion of characters
710      to the output encoding, the special name <literal moreinfo="none">-</literal> (dash)
711      can be used.
712      If the special name <literal moreinfo="none">auto</literal> is given, YAZ client will
713      convert strings to the encoding of the
714      terminal as returned by <function moreinfo="none">nl_langinfo</function> call.
715     </para>
716     <para>
717      If <replaceable>marcharset</replaceable> is given, it specifies name
718      of the character set of retrieved MARC records from server. See
719      also <literal moreinfo="none">marcharset</literal> command.
720     </para>
721     <note>
722      <para>
723       Since character set negotiation takes effect in the Z39.50
724       Initialize Request you should issue this command before
725       command <link linkend="command-open"><literal moreinfo="none">open</literal></link>
726       is used.
727      </para>
728     </note>
729     <note>
730      <para>
731       MARC records are not covered by Z39.50 character set negotiation,
732       so that's why there is a separate character that must be known
733       in order to do meaningful conversion(s).
734      </para>
735     </note>
736    </listitem>
737   </varlistentry>
738
739   <varlistentry><term>
740     <literal moreinfo="none">negcharset</literal>
741     <replaceable>charset</replaceable>
742    </term>
743    <listitem>
744     <para>Specifies character set for negotiation (Z39.50). The
745      argument is the same as second argument for command
746      <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
747     </para>
748    </listitem>
749   </varlistentry>
750
751   <varlistentry><term>
752     <literal moreinfo="none">displaycharset</literal>
753     <replaceable>charset</replaceable>
754    </term>
755    <listitem>
756     <para>Specifies character set for output (display). The
757      argument is the same as second argument for command
758      <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
759     </para>
760    </listitem>
761   </varlistentry>
762
763   <varlistentry><term>
764     <literal moreinfo="none">marccharset</literal>
765     <replaceable>charset</replaceable>
766    </term>
767    <listitem>
768     <para>Specifies character set for retrieved MARC records so
769      that YAZ client can display them in a character suitable
770      for your display. See <literal moreinfo="none">charset</literal> command.
771      If <literal moreinfo="none">auto</literal> is given, YAZ will assume
772      that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
773      for all other MARC variants. The charset argument is the
774      same as third argument for command
775      <link linkend="command-charset"><literal moreinfo="none">charset</literal></link>.
776     </para>
777    </listitem>
778   </varlistentry>
779
780   <varlistentry><term>
781     <literal moreinfo="none">querycharset</literal>
782     <replaceable>charset</replaceable>
783    </term>
784    <listitem>
785     <para>Specifies character set for query terms for Z39.50 RPN
786      queries and Z39.50 Scan Requests (termListAndStartPoint).
787      This is a pure client-side conversion which converts from
788      displayCharset to queryCharset.
789     </para>
790    </listitem>
791   </varlistentry>
792
793   <varlistentry><term>
794     <literal moreinfo="none">set_cclfile</literal>
795     <replaceable>filename</replaceable>
796    </term>
797    <listitem>
798     <para>Specifies that CCL fields should be read from file
799      file <replaceable>filename</replaceable>. This command does the
800      thing as option <literal moreinfo="none">-c</literal>.
801     </para>
802    </listitem>
803   </varlistentry>
804
805   <varlistentry><term>
806     <literal moreinfo="none">set_cqlfile</literal>
807     <replaceable>filename</replaceable>
808    </term>
809    <listitem>
810     <para>Specifies that CQL fields should be read from file
811      file <replaceable>filename</replaceable>. This command does the
812      thing as option <literal moreinfo="none">-q</literal>.
813     </para>
814    </listitem>
815   </varlistentry>
816
817   <varlistentry><term>
818     <literal moreinfo="none">register_oid</literal>
819     <replaceable>name</replaceable>
820     <replaceable>class</replaceable>
821     <replaceable>OID</replaceable>
822    </term>
823    <listitem>
824     <para>This command allows you to register your own object
825      identifier - so that instead of entering a long dot-notation
826      you can use a short name instead.
827      The <replaceable>name</replaceable> is your
828      name for the OID, <replaceable>class</replaceable> is the
829      class, and <replaceable>OID</replaceable> is the raw OID in
830      dot notation. Class is one <literal moreinfo="none">appctx</literal>,
831      <literal moreinfo="none">absyn</literal>, <literal moreinfo="none">attet</literal>,
832      <literal moreinfo="none">transyn</literal>, <literal moreinfo="none">diagset</literal>,
833      <literal moreinfo="none">recsyn</literal>, <literal moreinfo="none">resform</literal>,
834      <literal moreinfo="none">accform</literal>, <literal moreinfo="none">extserv</literal>,
835      <literal moreinfo="none">userinfo</literal>, <literal moreinfo="none">elemspec</literal>,
836      <literal moreinfo="none">varset</literal>, <literal moreinfo="none">schema</literal>,
837      <literal moreinfo="none">tagset</literal>, <literal moreinfo="none">general</literal>.
838      If you're in doubt use the <literal moreinfo="none">general</literal>
839      class.
840     </para>
841    </listitem>
842   </varlistentry>
843
844   <varlistentry><term>
845     <literal moreinfo="none">register_tab</literal>
846     <replaceable>command</replaceable>
847     <replaceable>string</replaceable>
848    </term>
849    <listitem>
850     <para>This command registers a TAB completion string for
851      the command given.
852     </para>
853    </listitem>
854   </varlistentry>
855
856   <varlistentry><term>
857     <literal moreinfo="none">sleep</literal>
858     <replaceable>seconds</replaceable>
859    </term>
860    <listitem>
861     <para>This command makes YAZ client sleep (be idle) for
862      the number of seconds given.
863     </para>
864    </listitem>
865   </varlistentry>
866
867   <varlistentry id="command-wait-response"><term>
868     <literal moreinfo="none">wait_response</literal>
869     [ <replaceable>number</replaceable>]
870    </term>
871    <listitem>
872     <para>This command makes YAZ client wait for a number of
873      response packages from target. If <replaceable>number</replaceable> is
874      omitted, 1 is assumed.
875     </para>
876     <para>This command is rarely used and is only useful if command
877      <link linkend="command-set-auto-wait">
878       <literal moreinfo="none">set_auto_wait</literal>
879      </link> is set to off.
880     </para>
881    </listitem>
882   </varlistentry>
883
884   <varlistentry id="command-xmles"><term>
885     <literal moreinfo="none">xmles</literal>
886     <replaceable>OID</replaceable>
887     <replaceable>doc</replaceable>
888    </term>
889    <listitem>
890     <para>Sends XML Extended Services request using the OID and doc given.
891     </para>
892    </listitem>
893   </varlistentry>
894
895   <varlistentry><term>
896     <literal moreinfo="none">zversion</literal>
897     <replaceable>ver</replaceable>
898    </term>
899    <listitem>
900     <para>This command sets Z39.50 version for negotiation.
901      Should be used before
902      <link linkend="command-open"><literal moreinfo="none">open</literal></link>.
903      By default 3 (version 3) is used.
904     </para>
905    </listitem>
906   </varlistentry>
907
908   <varlistentry><term>
909     <literal moreinfo="none">options</literal>
910     <replaceable>op1 op2..</replaceable>
911    </term>
912    <listitem>
913     <para>This command sets Z39.50 options for negotiation.
914      Should be used before
915      <link linkend="command-open"><literal moreinfo="none">open</literal></link>.
916     </para>
917     <para>
918      The following options are supported:
919      <literal moreinfo="none">search</literal>,
920      <literal moreinfo="none">present</literal>,
921      <literal moreinfo="none">delSet</literal>,
922      <literal moreinfo="none">resourceReport</literal>,
923      <literal moreinfo="none">triggerResourceCtrl</literal>,
924      <literal moreinfo="none">resourceCtrl</literal>,
925      <literal moreinfo="none">accessCtrl</literal>,
926      <literal moreinfo="none">scan</literal>,
927      <literal moreinfo="none">sort</literal>,
928      <literal moreinfo="none">extendedServices</literal>,
929      <literal moreinfo="none">level_1Segmentation</literal>,
930      <literal moreinfo="none">level_2Segmentation</literal>,
931      <literal moreinfo="none">concurrentOperations</literal>,
932      <literal moreinfo="none">namedResultSets</literal>,
933      <literal moreinfo="none">encapsulation</literal>,
934      <literal moreinfo="none">resultCount</literal>,
935      <literal moreinfo="none">negotiationModel</literal>,
936      <literal moreinfo="none">duplicationDetection</literal>,
937      <literal moreinfo="none">queryType104</literal>,
938      <literal moreinfo="none">pQESCorrection</literal>,
939      <literal moreinfo="none">stringSchema</literal>.
940     </para>
941    </listitem>
942   </varlistentry>
943
944  </variablelist>
945 </refsect1>
946 <refsect1><title>EXAMPLE</title>
947  <para>
948   The simplest example of a Prefix Query would be something like
949   <screen format="linespecific">
950    f knuth
951   </screen>
952   or
953   <screen format="linespecific">
954    f "donald knuth"
955   </screen>
956   In those queries no attributes was specified.
957   This leaves it up to the server what fields to search but
958   most servers will search in all fields. Some servers does not
959   support this feature though, and require that some attributes
960   are defined. To add one attribute you could do:
961   <screen format="linespecific">
962    f @attr 1=4 computer
963   </screen>
964   where we search in the title field, since the use(1) is title(4).
965   If we want to search in the author field <emphasis>and</emphasis>
966   in the title field, and in the title field using right truncation
967   it could look something like this:
968   <screen format="linespecific">
969    f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer
970   </screen>
971   Finally using a mix of Bib-1 and GILS attributes could look
972   something like this:
973   <screen format="linespecific">
974    f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather
975   </screen>
976  </para>
977 </refsect1>
978 <refsect1><title>FILES</title>
979  <para>
980   <filename moreinfo="none">yaz-&lt;version&gt;/client/client.c</filename>
981  </para>
982  <para>
983   <filename moreinfo="none">$HOME/.yazclientrc</filename>
984  </para>
985  <para>
986   <filename moreinfo="none">$HOME/.yazclient.history</filename>
987  </para>
988 </refsect1>
989 <refsect1><title>SEE ALSO</title>
990  <para>
991   <citerefentry>
992    <refentrytitle>yaz</refentrytitle>
993    <manvolnum>7</manvolnum>
994   </citerefentry>
995   <citerefentry>
996    <refentrytitle>bib1-attr</refentrytitle>
997    <manvolnum>7</manvolnum>
998   </citerefentry>
999  </para>
1000 </refsect1>
1001</refentry>
1002<!--Generated by stripref.xsl . Do not edit-->
1003<refentry id="yaz-ztest">
1004 <refentryinfo>
1005  <productname class="trade">YAZ</productname>
1006  <productnumber>5.14.3</productnumber>
1007  <info><orgname>Index Data</orgname></info>
1008 </refentryinfo>
1009
1010 <refmeta>
1011  <refentrytitle>yaz-ztest</refentrytitle>
1012  <manvolnum>8</manvolnum>
1013  <refmiscinfo class="manual">System management commands</refmiscinfo>
1014 </refmeta>
1015
1016 <refnamediv>
1017  <refname>yaz-ztest</refname>
1018  <refpurpose>Z39.50/SRU Test Server</refpurpose>
1019 </refnamediv>
1020
1021 <refsynopsisdiv>
1022  <!--
1023   cmd description of YAZ GFS application.
1024   Included in both manual and man page for yaz-ztest
1025-->
1026
1027<cmdsynopsis sepchar=" ">
1028 <command moreinfo="none">application</command>
1029 <arg choice="opt" rep="norepeat"><option>-install</option></arg>
1030 <arg choice="opt" rep="norepeat"><option>-installa</option></arg>
1031 <arg choice="opt" rep="norepeat"><option>-remove</option></arg>
1032 <arg choice="opt" rep="norepeat"><option>-a <replaceable>file</replaceable></option></arg>
1033 <arg choice="opt" rep="norepeat"><option>-v <replaceable>level</replaceable></option></arg>
1034 <arg choice="opt" rep="norepeat"><option>-l <replaceable>file</replaceable></option></arg>
1035 <arg choice="opt" rep="norepeat"><option>-u <replaceable>uid</replaceable></option></arg>
1036 <arg choice="opt" rep="norepeat"><option>-c <replaceable>config</replaceable></option></arg>
1037 <arg choice="opt" rep="norepeat"><option>-f <replaceable>vconfig</replaceable></option></arg>
1038 <arg choice="opt" rep="norepeat"><option>-C <replaceable>fname</replaceable></option></arg>
1039 <arg choice="opt" rep="norepeat"><option>-t <replaceable>minutes</replaceable></option></arg>
1040 <arg choice="opt" rep="norepeat"><option>-k <replaceable>kilobytes</replaceable></option></arg>
1041 <arg choice="opt" rep="norepeat"><option>-K</option></arg>
1042 <arg choice="opt" rep="norepeat"><option>-d <replaceable>daemon</replaceable></option></arg>
1043 <arg choice="opt" rep="norepeat"><option>-w <replaceable>dir</replaceable></option></arg>
1044 <arg choice="opt" rep="norepeat"><option>-p <replaceable>pidfile</replaceable></option></arg>
1045 <arg choice="opt" rep="norepeat"><option>-r <replaceable>kilobytes</replaceable></option></arg>
1046 <arg choice="opt" rep="norepeat"><option>-ziDSTV1</option></arg>
1047 <arg choice="opt" rep="repeat">listener-spec</arg>
1048</cmdsynopsis>
1049<!-- Keep this comment at the end of the file
1050Local variables:
1051mode: nxml
1052nxml-child-indent: 1
1053End:
1054-->
1055
1056 </refsynopsisdiv>
1057 <refsect1><title>DESCRIPTION</title>
1058  <para>
1059   <command moreinfo="none">yaz-ztest</command> is a Z39.50/SRU test server that uses
1060   the YAZ generic frontend server (GFS) API.
1061   The server acts as a real Z39.50/SRU server but does not use a database.
1062   It returns a random hit count and returns a subset of a few built-in
1063   records.
1064  </para>
1065  <para>
1066   The <replaceable>listener-spec</replaceable> consists of a transport
1067   mode followed by a colon, followed by a listener address. The
1068   transport mode is either <literal moreinfo="none">tcp</literal>, <literal moreinfo="none">unix</literal>,
1069   or <literal moreinfo="none">ssl</literal>.
1070  </para>
1071  <para>
1072   For TCP and SSL, an address has the form:
1073   <screen format="linespecific">
1074    hostname | IP-number [ : portnumber ]
1075   </screen>
1076  </para>
1077  <para>
1078   For UNIX local socket the address is the filename of the local socket.
1079  </para>
1080 </refsect1>
1081 <refsect1>
1082  <title>OPTIONS</title>
1083  <!--
1084   Options for generic frontend server and yaz-ztest.
1085   Included in both manual and man page for yaz-ztest
1086-->
1087
1088<variablelist>
1089 <varlistentry>
1090  <term><literal moreinfo="none">-a </literal>
1091  <replaceable>file</replaceable></term>
1092  <listitem><para>
1093   Specify a file for dumping PDUs (for diagnostic purposes).
1094    The special name <literal moreinfo="none">-</literal> (dash) sends output to
1095    <literal moreinfo="none">stderr</literal>.
1096  </para></listitem>
1097 </varlistentry>
1098 <varlistentry>
1099  <term><literal moreinfo="none">-S</literal></term>
1100  <listitem><para>
1101   Don't fork or make threads on connection requests. This is good for
1102   debugging, but not recommended for real operation: Although the
1103   server is asynchronous and non-blocking, it can be nice to keep
1104   a software malfunction (okay then, a crash) from affecting all
1105   current users.
1106   </para></listitem>
1107 </varlistentry>
1108 <varlistentry>
1109  <term><literal moreinfo="none">-1</literal></term>
1110  <listitem><para>
1111   Like <literal moreinfo="none">-S</literal> but after one session the server
1112   exits. This mode is for debugging <emphasis>only</emphasis>.
1113 </para></listitem>
1114 </varlistentry>
1115 <varlistentry>
1116  <term><literal moreinfo="none">-T</literal></term>
1117  <listitem><para>
1118   Operate the server in threaded mode. The server creates a thread
1119   for each connection rather than a fork a process. Only available
1120   on UNIX systems that offers POSIX threads.
1121  </para></listitem>
1122 </varlistentry>
1123 <varlistentry>
1124  <term><literal moreinfo="none">-s</literal></term>
1125  <listitem><para>
1126   Use the SR protocol (obsolete).
1127 </para></listitem>
1128 </varlistentry>
1129 <varlistentry>
1130  <term><literal moreinfo="none">-z</literal></term>
1131  <listitem><para>
1132   Use the Z39.50 protocol (default). This option and <literal moreinfo="none">-s</literal>
1133   complement each other.
1134   You can use both multiple times on the same command
1135   line, between listener-specifications (see below). This way, you
1136   can set up the server to listen for connections in both protocols
1137   concurrently, on different local ports.
1138  </para></listitem>
1139 </varlistentry>
1140 <varlistentry>
1141  <term><literal moreinfo="none">-l </literal><replaceable>file</replaceable></term>
1142  <listitem><para>The logfile.
1143  </para></listitem>
1144 </varlistentry>
1145 <varlistentry>
1146  <term><literal moreinfo="none">-c </literal><replaceable>config</replaceable></term>
1147  <listitem><para>A user option that serves as a specifier for some
1148  sort of configuration, usually a filename.
1149  The argument to this option is transferred to member
1150  <literal moreinfo="none">configname</literal> of the
1151  <literal moreinfo="none">statserv_options_block</literal>.
1152  </para></listitem>
1153 </varlistentry>
1154 <varlistentry>
1155  <term><literal moreinfo="none">-f </literal><replaceable>vconfig</replaceable></term>
1156  <listitem><para>This specifies an XML file that describes
1157  one or more YAZ frontend virtual servers.
1158  </para></listitem>
1159 </varlistentry>
1160 <varlistentry>
1161  <term><literal moreinfo="none">-C </literal><replaceable>fname</replaceable></term>
1162  <listitem><para>Sets SSL certificate file name for server (PEM).
1163 </para></listitem>
1164 </varlistentry>
1165 <varlistentry>
1166  <term><literal moreinfo="none">-v </literal><replaceable>level</replaceable></term>
1167  <listitem><para>
1168   The log level. Use a comma-separated list of members of the set
1169   {fatal,debug,warn,log,malloc,all,none}.
1170  </para></listitem>
1171 </varlistentry>
1172 <varlistentry>
1173  <term><literal moreinfo="none">-u </literal><replaceable>uid</replaceable></term>
1174  <listitem><para>
1175   Set user ID. Sets the real UID of the server process to that of the
1176   given user. It's useful if you aren't comfortable with having the
1177   server run as root, but you need to start it as such to bind a
1178   privileged port.
1179  </para></listitem>
1180 </varlistentry>
1181 <varlistentry>
1182  <term><literal moreinfo="none">-w </literal><replaceable>dir</replaceable></term>
1183  <listitem><para>
1184   The server changes to this directory during before listening
1185   on incoming connections. This option is useful
1186   when the server is operating from the <application moreinfo="none">inetd</application>
1187   daemon (see <literal moreinfo="none">-i</literal>).
1188  </para></listitem>
1189 </varlistentry>
1190 <varlistentry><term>
1191  <literal moreinfo="none">-p </literal><replaceable>pidfile</replaceable>
1192 </term>
1193 <listitem><para>
1194  Specifies that the server should write its Process ID to
1195  file given by <replaceable>pidfile</replaceable>.
1196  A typical location would be <filename moreinfo="none">/var/run/yaz-ztest.pid</filename>.
1197 </para></listitem>
1198 </varlistentry>
1199 <varlistentry>
1200  <term><literal moreinfo="none">-i</literal></term>
1201  <listitem><para>
1202   Use this to make the the server run from the
1203   <application moreinfo="none">inetd</application> server (UNIX only).
1204 </para></listitem>
1205 </varlistentry>
1206 <varlistentry>
1207  <term><literal moreinfo="none">-D</literal></term>
1208  <listitem><para>
1209   Use this to make the server put itself in the background and
1210   run as a daemon. If neither <literal moreinfo="none">-i</literal> nor
1211   <literal moreinfo="none">-D</literal> is given, the server starts in the foreground.
1212  </para></listitem>
1213 </varlistentry>
1214 <varlistentry>
1215  <term><literal moreinfo="none">-install</literal></term>
1216  <listitem><para>
1217   Use this to install the server as an NT service
1218   (Windows NT/2000/XP only).
1219   Control the server by going to the Services in the Control Panel.
1220 </para></listitem>
1221 </varlistentry>
1222 <varlistentry>
1223  <term><literal moreinfo="none">-installa</literal></term>
1224  <listitem><para>
1225   Use this to install the server as an NT service and mark it as "auto-start.
1226   Control the server by going to the Services in the Control Panel.
1227  </para></listitem>
1228 </varlistentry>
1229 <varlistentry>
1230  <term><literal moreinfo="none">-remove</literal></term>
1231  <listitem><para>
1232   Use this to remove the server from the NT services
1233   (Windows NT/2000/XP only).
1234 </para></listitem>
1235 </varlistentry>
1236 <varlistentry>
1237  <term><literal moreinfo="none">-t </literal><replaceable>minutes</replaceable></term>
1238  <listitem><para>
1239   Idle session timeout, in minutes.
1240 </para></listitem>
1241 </varlistentry>
1242 <varlistentry>
1243  <term><literal moreinfo="none">-k </literal><replaceable>size</replaceable></term>
1244  <listitem><para>
1245   Maximum record size/message size, in kilobytes.
1246  </para></listitem>
1247 </varlistentry>
1248 <varlistentry>
1249  <term><literal moreinfo="none">-K</literal></term>
1250  <listitem><para>
1251   Forces no-keepalive for HTTP sessions. By default GFS will keep
1252   sessions alive for HTTP 1.1 sessions (as defined by the standard).
1253   Using this option will force GFS to close the connection for each
1254   operation.
1255  </para></listitem>
1256 </varlistentry>
1257 <varlistentry>
1258  <term><literal moreinfo="none">-r </literal><replaceable>size</replaceable></term>
1259  <listitem><para>
1260   Maximum size of log file before rotation occurs, in kilobytes.
1261   Default size is 1048576 k (=1 GB).
1262  </para></listitem>
1263 </varlistentry>
1264 <varlistentry>
1265  <term>
1266   <literal moreinfo="none">-d </literal><replaceable>daemon</replaceable>
1267  </term>
1268  <listitem><para>
1269   Set name of daemon to be used in hosts access file.
1270   See
1271   <citerefentry>
1272    <refentrytitle>hosts_access</refentrytitle>
1273    <manvolnum>5</manvolnum>
1274   </citerefentry>
1275   and
1276   <citerefentry>
1277    <refentrytitle>tcpd</refentrytitle>
1278    <manvolnum>8</manvolnum>
1279    </citerefentry>.
1280  </para></listitem>
1281 </varlistentry>
1282 <varlistentry>
1283  <term><literal moreinfo="none">-m </literal><replaceable>time-format</replaceable></term>
1284  <listitem><para>
1285   Sets the format of time-stamps in the log-file. Specify a string in
1286   the input format to <literal moreinfo="none">strftime()</literal>.
1287  </para></listitem>
1288 </varlistentry>
1289 <varlistentry>
1290  <term><literal moreinfo="none">-V </literal></term>
1291  <listitem><para>
1292   Display YAZ version and exit.
1293  </para></listitem>
1294 </varlistentry>
1295</variablelist>
1296
1297<!-- Keep this comment at the end of the file
1298Local variables:
1299mode: nxml
1300nxml-child-indent: 1
1301End:
1302-->
1303
1304 </refsect1>
1305 <refsect1>
1306   <title>TESTING</title>
1307   <para>
1308    <command moreinfo="none">yaz-ztest</command> normally returns a random hit count between
1309    0 and 24. However, if a query term includes leading digits, then the
1310    integer value of that term is used as hit count. This allows testers
1311    to return any number of hits. <command moreinfo="none">yaz-ztest</command> includes
1312    24 MARC records for testing. Hit counts exceeding 24 will make
1313    <command moreinfo="none">yaz-ztest</command> return the same record batch over and over..
1314    So record at position 1, 25, 49, etc .. are equivalent.
1315   </para>
1316   <para>
1317    For XML if no element set is given or element has value "marcxml",
1318    MARCXML is returned (each of the 24 dummy records converted from
1319    ISO2709 to XML). For element set OP, OPAC XML is returned.
1320   </para>
1321   <para>
1322    yaz-ztest may also return predefined XML records (for testing).
1323    This is enabled if <literal moreinfo="none">YAZ_ZTEST_XML_FETCH</literal> environment
1324    variable is defined. A record is fetched form a file (one record per file).
1325    The path for the filename is
1326    <replaceable>F</replaceable><replaceable>E</replaceable><literal moreinfo="none">.</literal><replaceable>d</replaceable><literal moreinfo="none">.xml</literal>
1327    where <replaceable>F</replaceable> is the YAZ_ZTEST_XML_FETCH value
1328    (possibly
1329    empty), <replaceable>E</replaceable> is element-set,
1330    <replaceable>d</replaceable> is record position (starting from 1).
1331   </para>
1332   <para>
1333     The following databases are honored by <command moreinfo="none">yaz-ztest</command>:
1334     <literal moreinfo="none">Default</literal>, <literal moreinfo="none">slow</literal>
1335     and <literal moreinfo="none">db.*</literal> (all databases with prefix "db"). Any
1336     other database will make <command moreinfo="none">yaz-ztest</command> return diagnostic
1337     109: "Database unavailable".
1338   </para>
1339   <para>
1340     Options for search may be included in the form or URL get arguments
1341     included as part of the Z39.50 database name. The following
1342     database options are present: <literal moreinfo="none">search-delay</literal>,
1343     <literal moreinfo="none">present-delay</literal>, <literal moreinfo="none">fetch-delay</literal>
1344     and <literal moreinfo="none">seed</literal>.
1345   </para>
1346   <para>
1347     The former, delay type options, specify
1348     a fake delay (sleep) that <command moreinfo="none">yaz-ztest</command> will perform
1349     when searching, presenting, fetching records respectively.
1350     The value of the delay may either be a fixed floating point
1351     value which specifies the delay in seconds.
1352     Alternatively the value may be given as two floating point numbers
1353     separated by colon, which wil make <command moreinfo="none">yaz-ztest</command> perform
1354     a random sleep between the first and second number.
1355   </para>
1356   <para>
1357     The database parameter <literal moreinfo="none">seed</literal> takes an integer
1358     as value. This will call <literal moreinfo="none">srand</literal> with this integer to
1359     ensure that the random behavior can be re-played.
1360   </para>
1361   <para>
1362     Suppose we want searches to take between 0.1 and 0.5 seconds and
1363     a fetch to take 0.2 second. To access test database Default we'd use:
1364     <literal moreinfo="none">Default?search-delay=0.1:0.5&amp;fetch-delay=0.2</literal>.
1365   </para>
1366 </refsect1>
1367 <refsect1><title>GFS CONFIGURATION AND VIRTUAL HOSTS</title>
1368  <!--
1369   Description of the virtual host mechanism in YAZ GFS
1370   Included in both manual and man page for yaz-ztest
1371-->
1372
1373<para>
1374 The Virtual hosts mechanism allows a YAZ frontend server to
1375 support multiple backends. A backend is selected on the basis of
1376 the TCP/IP binding (port+listening adddress) and/or the virtual host.
1377</para>
1378<para>
1379 A backend can be configured to execute in a particular working
1380 directory. Or the YAZ frontend may perform CQL to RPN conversion, thus
1381 allowing traditional Z39.50 backends to be offered as a SRW/SRU
1382 service. SRW/SRU Explain information for a particular backend may also
1383 be specified.
1384</para>
1385<para>
1386 For the HTTP protocol, the virtual host is specified in the Host header.
1387 For the Z39.50 protocol, the virtual host is specified as in the
1388 Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1.
1389</para>
1390<note>
1391 <para>
1392  Not all Z39.50 clients allows the VHOST information to be set.
1393  For those the selection of the backend must rely on the
1394  TCP/IP information alone (port and address).
1395 </para>
1396</note>
1397<para>
1398 The YAZ frontend server uses XML to describe the backend
1399 configurations. Command-line option <literal moreinfo="none">-f</literal>
1400 specifies filename of the XML configuration.
1401</para>
1402<para>
1403 The configuration uses the root element <literal moreinfo="none">yazgfs</literal>.
1404 This element includes a list of <literal moreinfo="none">listen</literal> elements,
1405 followed by one or more <literal moreinfo="none">server</literal> elements.
1406</para>
1407<para>
1408 The <literal moreinfo="none">listen</literal> describes listener (transport end point),
1409 such as TCP/IP, Unix file socket or SSL server. Content for
1410 a listener:
1411 <variablelist>
1412  <varlistentry><term>CDATA (required)</term>
1413   <listitem>
1414    <para>
1415     The CDATA for the <literal moreinfo="none">listen</literal> element holds the
1416     listener string, such as <literal moreinfo="none">tcp:@:210</literal>,
1417     <literal moreinfo="none">tcp:server1:2100</literal>,
1418     etc.
1419    </para>
1420   </listitem>
1421  </varlistentry>
1422  <varlistentry><term>attribute <literal moreinfo="none">id</literal> (optional)</term>
1423    <listitem>
1424     <para>
1425      identifier for this listener. This may be referred to from
1426      server sections.
1427     </para>
1428    </listitem>
1429   </varlistentry>
1430 </variablelist>
1431 <note>
1432  <para>
1433   We expect more information to be added for the listen section in
1434   a future version, such as CERT file for SSL servers.
1435  </para>
1436 </note>
1437</para>
1438<para>
1439 The <literal moreinfo="none">server</literal> describes a server and the parameters
1440 for this server type. Content for a server:
1441 <variablelist>
1442  <varlistentry><term>attribute <literal moreinfo="none">id</literal> (optional)</term>
1443   <listitem>
1444    <para>
1445     Identifier for this server. Currently not used for anything,
1446     but it might be for logging purposes.
1447   </para>
1448   </listitem>
1449  </varlistentry>
1450
1451  <varlistentry><term>attribute <literal moreinfo="none">listenref</literal> (optional)</term>
1452   <listitem>
1453    <para>
1454     Specifies one or more listeners for this server. Each server ID is
1455     separated by a comma.
1456     If this attribute is not given, the server is accessible from all
1457     listeners. In order for the server to be used for real, however, the
1458     virtual host must match if specified in the configuration.
1459    </para>
1460   </listitem>
1461  </varlistentry>
1462
1463  <varlistentry><term>element <literal moreinfo="none">config</literal> (optional)</term>
1464   <listitem>
1465    <para>
1466     Specifies the server configuration. This is equivalent
1467     to the config specified using command line option
1468     <literal moreinfo="none">-c</literal>.
1469    </para>
1470   </listitem>
1471  </varlistentry>
1472
1473  <varlistentry><term>element <literal moreinfo="none">directory</literal> (optional)</term>
1474   <listitem>
1475    <para>
1476     Specifies a working directory for this backend server. If
1477     specifid, the YAZ fronend changes current working directory
1478     to this directory whenever a backend of this type is
1479     started (backend handler bend_start), stopped (backend handler hand_stop)
1480     and initialized (bend_init).
1481    </para>
1482   </listitem>
1483  </varlistentry>
1484
1485  <varlistentry><term>element <literal moreinfo="none">host</literal> (optional)</term>
1486   <listitem>
1487    <para>
1488     Specifies the virtual host for this server. If this is specified
1489     a client <emphasis>must</emphasis> specify this host string in
1490     order to use this backend.
1491    </para>
1492   </listitem>
1493  </varlistentry>
1494
1495  <varlistentry><term>element <literal moreinfo="none">cql2rpn</literal> (optional)</term>
1496   <listitem>
1497    <para>
1498     Specifies a filename that includes CQL to RPN conversion for this
1499     backend server. See <xref linkend="cql.to.rpn"/>
1500     If given, the backend server will only "see" a Type-1/RPN query.
1501    </para>
1502   </listitem>
1503  </varlistentry>
1504
1505  <varlistentry><term>element <literal moreinfo="none">ccl2rpn</literal> (optional)</term>
1506   <listitem>
1507    <para>
1508     Specifies a filename that includes CCL to RPN conversion for this
1509     backend server. See <xref linkend="ccl.qualifiers"/>
1510     If given, the backend server will only "see" a Type-1/RPN query.
1511    </para>
1512   </listitem>
1513  </varlistentry>
1514
1515  <varlistentry><term>element <literal moreinfo="none">stylesheet</literal> (optional)</term>
1516   <listitem>
1517    <para>
1518     Specifies the stylesheet reference to be part of SRU HTTP responses
1519     when the client does not specify one. If neither this is given, nor
1520     the client specifies one, no stylesheet reference is part of the
1521     SRU HTTP response.
1522    </para>
1523   </listitem>
1524  </varlistentry>
1525
1526  <varlistentry><term>element <literal moreinfo="none">client_query_charset</literal> (optional)</term>
1527   <listitem>
1528    <para>
1529     If specified, a conversion from the character set given to UTF-8 is
1530     performed by the generic frontend server. It is only executed for
1531     Z39.50 search requests (SRU/Solr are assumed to be UTF-8 encoded already).
1532    </para>
1533   </listitem>
1534  </varlistentry>
1535
1536  <varlistentry><term>element <literal moreinfo="none">docpath</literal> (optional)</term>
1537   <listitem>
1538    <para>
1539     Specifies a path for local file access using HTTP. All URLs with
1540     a leading prefix (/ exluded) that matches the value of docpath
1541     are used for file access. For example, if the server is to offer
1542     access in directory <literal moreinfo="none">xsl</literal>, the docpath would be
1543     <literal moreinfo="none">xsl</literal> and all URLs of the form
1544     <literal moreinfo="none">http://host/exl</literal> will result in a local file access.
1545    </para>
1546   </listitem>
1547  </varlistentry>
1548
1549  <varlistentry><term>element <literal moreinfo="none">explain</literal> (optional)</term>
1550   <listitem>
1551    <para>
1552     Specifies SRW/SRU ZeeRex content for this server. Copied verbatim
1553     to the client. As things are now, some of the Explain content
1554     seeem redundant because host information, etc. is also stored
1555     elsewhere.
1556    </para>
1557   </listitem>
1558  </varlistentry>
1559
1560  <varlistentry><term>element <literal moreinfo="none">maximumrecordsize</literal> (optional)</term>
1561   <listitem>
1562    <para>
1563     Specifies maximum record size/message size, in bytes. This
1564     value also servers as maximum size of <emphasis>incoming</emphasis>
1565     packages (for Record Updates etc). It's the same value as that
1566     given by the <literal moreinfo="none">-k</literal> option.
1567    </para>
1568   </listitem>
1569  </varlistentry>
1570
1571  <varlistentry><term>element <literal moreinfo="none">retrievalinfo</literal> (optional)</term>
1572   <listitem>
1573    <para>
1574     Enables the retrieval facility supporting conversions and
1575     specifications of record formats/types.
1576     See <xref linkend="tools.retrieval"/> for
1577     more information.
1578    </para>
1579   </listitem>
1580  </varlistentry>
1581
1582 </variablelist>
1583</para>
1584
1585<para>
1586 The XML below configures a server that accepts connections from
1587 two ports, TCP/IP port 9900 and a local UNIX file socket.
1588 We name the TCP/IP server <literal moreinfo="none">public</literal> and the
1589 other server <literal moreinfo="none">internal</literal>.
1590 </para>
1591 <screen format="linespecific">
1592 
1593 &lt;yazgfs&gt;
1594  &lt;listen id="public"&gt;tcp:@:9900&lt;/listen&gt;
1595  &lt;listen id="internal"&gt;unix:/var/tmp/socket&lt;/listen&gt;
1596  &lt;server id="server1"&gt;
1597    &lt;host&gt;server1.mydomain&lt;/host&gt;
1598    &lt;directory&gt;/var/www/s1&lt;/directory&gt;
1599    &lt;config&gt;config.cfg&lt;/config&gt;
1600  &lt;/server&gt;
1601  &lt;server id="server2" listenref="public,internal"&gt;
1602    &lt;host&gt;server2.mydomain&lt;/host&gt;
1603    &lt;directory&gt;/var/www/s2&lt;/directory&gt;
1604    &lt;config&gt;config.cfg&lt;/config&gt;
1605    &lt;cql2rpn&gt;../etc/pqf.properties&lt;/cql2rpn&gt;
1606    &lt;explain xmlns="http://explain.z3950.org/dtd/2.0/"&gt;
1607      &lt;serverInfo&gt;
1608        &lt;host&gt;server2.mydomain&lt;/host&gt;
1609        &lt;port&gt;9900&lt;/port&gt;
1610        &lt;database&gt;a&lt;/database&gt;
1611      &lt;/serverInfo&gt;
1612    &lt;/explain&gt;
1613  &lt;/server&gt;
1614  &lt;server id="server3" listenref="internal"&gt;
1615    &lt;directory&gt;/var/www/s3&lt;/directory&gt;
1616    &lt;config&gt;config.cfg&lt;/config&gt;
1617  &lt;/server&gt;
1618 &lt;/yazgfs&gt;
1619
1620 </screen>
1621<para>
1622 There are three configured backend servers. The first two
1623 servers, <literal moreinfo="none">"server1"</literal> and <literal moreinfo="none">"server2"</literal>,
1624 can be reached by both listener addresses.
1625 <literal moreinfo="none">"server1"</literal> is reached by all (two) since no
1626  <literal moreinfo="none">listenref</literal> attribute is specified.
1627 <literal moreinfo="none">"server2"</literal> is reached by the two listeners specified.
1628 In order to distinguish between the two, a virtual host has
1629 been specified for each of server in the <literal moreinfo="none">host</literal>
1630 elements.
1631</para>
1632<para>
1633 For <literal moreinfo="none">"server2"</literal> elements for CQL to RPN conversion
1634 is supported and explain information has been added (a short one here
1635 to keep the example small).
1636</para>
1637<para>
1638 The third server, <literal moreinfo="none">"server3"</literal> can only be reached
1639 via listener <literal moreinfo="none">"internal"</literal>.
1640</para>
1641
1642<!-- Keep this comment at the end of the file
1643Local variables:
1644mode: nxml
1645nxml-child-indent: 1
1646End:
1647-->
1648
1649 </refsect1>
1650 <refsect1><title>FILES</title>
1651  <para>
1652   <filename moreinfo="none">yaz-&lt;version&gt;/ztest/yaz-ztest.c</filename>
1653  </para>
1654  <para>
1655   <filename moreinfo="none">yaz-&lt;version&gt;/include/yaz/backend.h</filename>
1656  </para>
1657 </refsect1>
1658 <refsect1><title>SEE ALSO</title>
1659  <para>
1660   <citerefentry>
1661    <refentrytitle>yaz</refentrytitle>
1662    <manvolnum>7</manvolnum>
1663   </citerefentry>
1664   <citerefentry>
1665    <refentrytitle>yaz-log</refentrytitle>
1666    <manvolnum>7</manvolnum>
1667   </citerefentry>
1668  </para>
1669 </refsect1>
1670</refentry>
1671<!--Generated by stripref.xsl . Do not edit-->
1672<refentry id="yaz-config">
1673 <refentryinfo>
1674  <productname class="trade">YAZ</productname>
1675  <productnumber>5.14.3</productnumber>
1676  <info><orgname>Index Data</orgname></info>
1677 </refentryinfo>
1678
1679 <refmeta>
1680  <refentrytitle>yaz-config</refentrytitle>
1681  <manvolnum>1</manvolnum>
1682  <refmiscinfo class="manual">Commands</refmiscinfo>
1683 </refmeta>
1684
1685 <refnamediv>
1686  <refname>yaz-config</refname>
1687  <refpurpose>Script to get information about YAZ.</refpurpose>
1688 </refnamediv>
1689
1690 <refsynopsisdiv>
1691  <cmdsynopsis sepchar=" ">
1692   <command moreinfo="none">yaz-config</command>
1693   <arg choice="opt" rep="norepeat"><option>--prefix[=<replaceable>DIR</replaceable>]</option></arg>
1694   <arg choice="opt" rep="norepeat"><option>--version</option></arg>
1695   <arg choice="opt" rep="norepeat"><option>--libs</option></arg>
1696   <arg choice="opt" rep="norepeat"><option>--lalibs</option></arg>
1697   <arg choice="opt" rep="norepeat"><option>--cflags</option></arg>
1698   <arg choice="opt" rep="norepeat"><option>--include</option></arg>
1699   <arg choice="opt" rep="norepeat"><option>--comp</option></arg>
1700   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
1701   <arg choice="opt" rep="repeat">libraries</arg>
1702  </cmdsynopsis>
1703 </refsynopsisdiv>
1704
1705 <refsect1><title>DESCRIPTION</title>
1706  <para>
1707   <command moreinfo="none">yaz-config</command> is a script that returns information
1708   that your own software should use to build software that uses YAZ.
1709  </para>
1710
1711  <para>
1712   The following libraries are supported:
1713  </para>
1714
1715  <variablelist>
1716   <varlistentry>
1717    <term>threads</term>
1718    <listitem><para>
1719      Use the threaded version of YAZ.
1720     </para></listitem>
1721   </varlistentry>
1722  </variablelist>
1723
1724 </refsect1>
1725
1726 <refsect1><title>OPTIONS</title>
1727
1728  <variablelist>
1729   <varlistentry>
1730    <term>--prefix[=<replaceable>DIR</replaceable>]</term>
1731    <listitem><para>
1732      Returns prefix of YAZ or assume a different one if DIR is
1733      specified.
1734     </para></listitem>
1735   </varlistentry>
1736
1737   <varlistentry>
1738    <term>--version</term>
1739    <listitem><para>
1740      Returns version of YAZ.
1741     </para></listitem>
1742   </varlistentry>
1743
1744   <varlistentry>
1745    <term>--libs</term>
1746    <listitem><para>
1747      Library specification be used when using YAZ.
1748     </para></listitem>
1749   </varlistentry>
1750
1751   <varlistentry>
1752    <term>--lalibs</term>
1753    <listitem><para>
1754      Return library specification.
1755     </para></listitem>
1756   </varlistentry>
1757
1758   <varlistentry>
1759    <term>--cflags</term>
1760    <listitem><para>
1761      Return C Compiler flags.
1762     </para></listitem>
1763   </varlistentry>
1764
1765   <varlistentry>
1766    <term>--include</term>
1767    <listitem><para>
1768      Return C compiler includes for YAZ header files (-Ipath).
1769     </para></listitem>
1770   </varlistentry>
1771
1772   <varlistentry>
1773    <term>--comp</term>
1774    <listitem><para>
1775      Returns full path to YAZ' ASN.1 compiler: yaz-asncomp.
1776     </para></listitem>
1777   </varlistentry>
1778
1779   <varlistentry>
1780    <term>-V</term>
1781    <listitem><para>
1782      veturns YAZ SHA1 ID (from Git) and version.
1783     </para></listitem>
1784   </varlistentry>
1785
1786  </variablelist>
1787 </refsect1>
1788
1789 <refsect1><title>FILES</title>
1790  <para>
1791   <filename moreinfo="none">/usr/bin/yaz-config</filename>
1792  </para>
1793  <para>
1794   <filename moreinfo="none">/usr/lib/libyaz*.a</filename>
1795  </para>
1796  <para>
1797   <filename moreinfo="none">/usr/include/yaz/*.h</filename>
1798  </para>
1799  </refsect1>
1800 <refsect1><title>SEE ALSO</title>
1801  <para>
1802   yaz(7)
1803  </para>
1804  <para>
1805   Section "How to make apps using YAZ on UNIX" in the YAZ manual.
1806  </para>
1807 </refsect1>
1808</refentry>
1809<!--Generated by stripref.xsl . Do not edit-->
1810<refentry id="yaz">
1811 <refentryinfo>
1812  <productname class="trade">YAZ</productname>
1813  <productnumber>5.14.3</productnumber>
1814  <info><orgname>Index Data</orgname></info>
1815 </refentryinfo>
1816
1817 <refmeta>
1818  <refentrytitle>yaz</refentrytitle>
1819  <manvolnum>7</manvolnum>
1820  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
1821 </refmeta>
1822
1823 <refnamediv>
1824  <refname>yaz</refname>
1825  <refpurpose>Z39.50 toolkit.</refpurpose>
1826 </refnamediv>
1827
1828 <refsect1><title>DESCRIPTION</title>
1829  <para>
1830   YAZ is a C/C++ programmer's toolkit supporting the development
1831   of Z39.50v3 clients and servers. The YAZ toolkit offers
1832   several different levels of access to the ISO23950/Z39.50, SRU
1833   Solr (client only) and ILL protocols. The level that you need to use depends
1834   on your requirements, and the role (server or client) that you want
1835   to implement.
1836  </para>
1837 </refsect1>
1838
1839 <refsect1><title>COPYRIGHT</title>
1840  <para>
1841   Copyright © 1995-2015 Index Data.
1842  </para>
1843  <para>
1844   All rights reserved.
1845  </para>
1846
1847  <para>
1848   Redistribution and use in source and binary forms, with or without
1849   modification, are permitted provided that the following conditions are met:
1850  </para>
1851
1852  <itemizedlist>
1853   <listitem>
1854    <para>
1855     Redistributions of source code must retain the above copyright
1856     notice, this list of conditions and the following disclaimer.
1857    </para>
1858   </listitem>
1859   <listitem>
1860    <para>
1861     Redistributions in binary form must reproduce the above copyright
1862     notice, this list of conditions and the following disclaimer in the
1863     documentation and/or other materials provided with the distribution.
1864    </para>
1865   </listitem>
1866   <listitem>
1867    <para>
1868     Neither the name of Index Data nor the names of its contributors
1869     may be used to endorse or promote products derived from this
1870     software without specific prior written permission.
1871    </para>
1872   </listitem>
1873  </itemizedlist>
1874
1875  <para>
1876   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
1877   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1878   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1879   DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR
1880   ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1881   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1882   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1883   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1884   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1885   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1886   SUCH DAMAGE.
1887  </para>
1888
1889 </refsect1>
1890
1891 <refsect1><title>SEE ALSO</title>
1892  <para>
1893    <citerefentry>
1894     <refentrytitle>yaz-client</refentrytitle>
1895     <manvolnum>1</manvolnum>
1896    </citerefentry>,
1897    <citerefentry>
1898     <refentrytitle>yaz-ztest</refentrytitle>
1899     <manvolnum>8</manvolnum>
1900    </citerefentry>,
1901    <citerefentry>
1902     <refentrytitle>yaz-config</refentrytitle>
1903     <manvolnum>8</manvolnum>
1904    </citerefentry>,
1905    <citerefentry>
1906     <refentrytitle>zoomsh</refentrytitle>
1907     <manvolnum>1</manvolnum>
1908    </citerefentry>
1909    <citerefentry>
1910     <refentrytitle>bib1-attr</refentrytitle>
1911     <manvolnum>7</manvolnum>
1912    </citerefentry>
1913  </para>
1914  <para>YAZ manual (
1915   <filename moreinfo="none">/usr/share/doc/yaz</filename>)
1916  </para>
1917  <para>
1918   <ulink url="http://www.indexdata.com/yaz">YAZ home page</ulink>.
1919  </para>
1920  <para>
1921   <ulink url="http://www.loc.gov/z3950/agency/">Z39.50 Maintenance Agency Page</ulink>.
1922  </para>
1923 </refsect1>
1924</refentry>
1925<!--Generated by stripref.xsl . Do not edit-->
1926<refentry id="zoomsh">
1927 <refentryinfo>
1928  <productname class="trade">YAZ</productname>
1929  <productnumber>5.14.3</productnumber>
1930  <info><orgname>Index Data</orgname></info>
1931 </refentryinfo>
1932
1933 <refmeta>
1934  <refentrytitle>zoomsh</refentrytitle>
1935  <manvolnum>1</manvolnum>
1936  <refmiscinfo class="manual">Commands</refmiscinfo>
1937 </refmeta>
1938
1939 <refnamediv>
1940  <refname>zoomsh</refname>
1941  <refpurpose>ZOOM shell</refpurpose>
1942 </refnamediv>
1943
1944 <refsynopsisdiv>
1945  <cmdsynopsis sepchar=" ">
1946   <command moreinfo="none">zoomsh</command>
1947   <arg choice="opt" rep="norepeat"><option>-a <replaceable>apdufile</replaceable></option></arg>
1948   <arg choice="opt" rep="norepeat"><option>-e</option></arg>
1949   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
1950   <arg choice="opt" rep="repeat">commands</arg>
1951  </cmdsynopsis>
1952 </refsynopsisdiv>
1953
1954  <refsect1><title>DESCRIPTION</title>
1955   <para>
1956    <command moreinfo="none">zoomsh</command> is a ZOOM client with a simple
1957    command line interface. The client demonstrates the ZOOM
1958    API and is useful for testing targets.
1959   </para>
1960   <para>
1961    You may pass one or more commands to <command moreinfo="none">zoomsh</command>.
1962    These commands are invoked first.
1963   </para>
1964  </refsect1>
1965
1966  <refsect1>
1967   <title>OPTIONS</title>
1968   <variablelist>
1969    <varlistentry>
1970     <term>-a <replaceable>apdufile</replaceable></term>
1971     <listitem><para>
1972      Logs protocol packages into apdufile (APDU log).
1973      </para></listitem>
1974    </varlistentry>
1975    <varlistentry>
1976     <term>-e</term>
1977     <listitem><para>
1978      Makes zoomsh stop processing commands as soon as an error occur.
1979      The exit code of zoomsh is 1 if error occurs; 0 otherwise.
1980      </para></listitem>
1981    </varlistentry>
1982    <varlistentry>
1983     <term>-v <replaceable>loglevel</replaceable></term>
1984     <listitem><para>
1985       Sets YAZ log level to <replaceable>loglevel</replaceable>.
1986      </para></listitem>
1987    </varlistentry>
1988   </variablelist>
1989  </refsect1>
1990  <refsect1><title>EXAMPLES</title>
1991   <para>
1992    If you start the <command moreinfo="none">yaz-ztest</command> in one console you
1993    can use the ZOOM shell as follows:
1994    <screen format="linespecific">
1995$ zoomsh
1996ZOOM&gt;connect localhost:9999
1997ZOOM&gt;search computer
1998localhost:9999: 7 hits
1999ZOOM&gt;show 0 1
20001 Default USmarc
2001001    11224466
2002003 DLC
2003005 00000000000000.0
2004008 910710c19910701nju           00010 eng
2005010    $a    11224466
2006040    $a DLC $c DLC
2007050 00 $a 123-xyz
2008100 10 $a Jack Collins
2009245 10 $a How to program a computer
2010260 1  $a Penguin
2011263    $a 8710
2012300    $a p. cm.
2013ZOOM&gt;quit
2014
2015    </screen>
2016   </para>
2017   <para>
2018    You can also achieve the same result by passing the commands
2019    as arguments on a single command line:
2020   </para>
2021   <para>
2022    <literal moreinfo="none">$ zoomsh "connect localhost:9999" "search computer"</literal>
2023    <literal moreinfo="none">"show 0 1" quit</literal>
2024   </para>
2025  </refsect1>
2026  <refsect1><title>COMMANDS</title>
2027   <variablelist>
2028
2029    <varlistentry><term><literal moreinfo="none">connect</literal>
2030      <replaceable>zurl</replaceable></term>
2031     <listitem><para>
2032       Connects to the target given by <replaceable>zurl</replaceable>.
2033      </para></listitem></varlistentry>
2034
2035    <varlistentry><term><literal moreinfo="none">close</literal>
2036      [<replaceable>zurl</replaceable>]</term>
2037     <listitem><para>
2038       Closes connection to target given by
2039       <replaceable>zurl</replaceable> or all targets if
2040       <replaceable>zurl</replaceable> was omitted.
2041      </para></listitem></varlistentry>
2042
2043    <varlistentry><term><literal moreinfo="none">show</literal>
2044      [<replaceable>start</replaceable>
2045      [<replaceable>count</replaceable>]]
2046     </term>
2047     <listitem><para>
2048       Displays <literal moreinfo="none">count</literal> records starting at offset given
2049       by <replaceable>start</replaceable>. First records has offset 0
2050       (unlike the Z39.50 protocol).
2051      </para></listitem></varlistentry>
2052
2053    <varlistentry><term><literal moreinfo="none">quit</literal>
2054     </term>
2055     <listitem><para>
2056       Quits <command moreinfo="none">zoomsh</command>.
2057      </para></listitem></varlistentry>
2058
2059    <varlistentry><term><literal moreinfo="none">set</literal>
2060      <replaceable>name</replaceable>
2061      [<replaceable>value</replaceable>]
2062     </term>
2063     <listitem><para>
2064       Sets option <replaceable>name</replaceable> to
2065       <replaceable>value</replaceable>.
2066      </para></listitem></varlistentry>
2067
2068    <varlistentry><term><literal moreinfo="none">get</literal>
2069      <replaceable>name</replaceable>
2070     </term>
2071     <listitem><para>
2072       Prints value of option <replaceable>name</replaceable>.
2073      </para></listitem></varlistentry>
2074
2075    <varlistentry><term><literal moreinfo="none">help</literal>
2076     </term>
2077     <listitem><para>
2078       Prints list of available commands.
2079      </para></listitem></varlistentry>
2080
2081   </variablelist>
2082
2083  </refsect1>
2084  <refsect1><title>SEE ALSO</title>
2085   <para>
2086    <citerefentry>
2087     <refentrytitle>yaz</refentrytitle>
2088     <manvolnum>7</manvolnum>
2089    </citerefentry>,
2090    <citerefentry>
2091     <refentrytitle>yaz-ztest</refentrytitle>
2092     <manvolnum>8</manvolnum>
2093    </citerefentry>,
2094   </para>
2095   <para>
2096    Section "Building clients with ZOOM" in the YAZ manual.
2097   </para>
2098   <para>
2099    <ulink url="http://zoom.z3950.org/">ZOOM home page</ulink>.
2100   </para>
2101  </refsect1>
2102</refentry>
2103<!--Generated by stripref.xsl . Do not edit-->
2104<refentry id="yaz-asncomp">
2105 <refentryinfo>
2106  <productname class="trade">YAZ</productname>
2107  <productnumber>5.14.3</productnumber>
2108  <info><orgname>Index Data</orgname></info>
2109 </refentryinfo>
2110
2111 <refmeta>
2112  <refentrytitle>yaz-asncomp</refentrytitle>
2113  <manvolnum>1</manvolnum>
2114  <refmiscinfo class="manual">Commands</refmiscinfo>
2115 </refmeta>
2116
2117 <refnamediv>
2118  <refname>yaz-asncomp</refname>
2119  <refpurpose>YAZ ASN.1 compiler</refpurpose>
2120 </refnamediv>
2121
2122 <refsynopsisdiv>
2123  <cmdsynopsis sepchar=" ">
2124   <command moreinfo="none">yaz-asncomp</command>
2125   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
2126   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cfile</replaceable></option></arg>
2127   <arg choice="opt" rep="norepeat"><option>-h <replaceable>hfile</replaceable></option></arg>
2128   <arg choice="opt" rep="norepeat"><option>-p <replaceable>pfile</replaceable></option></arg>
2129   <arg choice="opt" rep="norepeat"><option>-d <replaceable>config</replaceable></option></arg>
2130   <arg choice="opt" rep="norepeat"><option>-I <replaceable>includeout</replaceable></option></arg>
2131   <arg choice="opt" rep="norepeat"><option>-i <replaceable>includedir</replaceable></option></arg>
2132   <arg choice="opt" rep="norepeat"><option>-m <replaceable>module</replaceable></option></arg>
2133   <arg choice="opt" rep="norepeat">filename</arg>
2134  </cmdsynopsis>
2135
2136 </refsynopsisdiv>
2137  <refsect1><title>DESCRIPTION</title>
2138  <para>
2139   <command moreinfo="none">yaz-asncomp</command> is an ASN.1 compiler that
2140   reads an ASN.1 specification in <replaceable>filename</replaceable>
2141   and produces C/C++ definitions and BER encoders/decoders for it.
2142  </para>
2143  <para>
2144   The produced C/C++ code and header files uses the ODR module of YAZ
2145   which is a library that encodes/decodes/prints BER packages.
2146   <command moreinfo="none">yaz-asncomp</command> allows you to specify name of
2147   resulting source via options. Alternatively, you can specify
2148   a DEFINISIONS file, which provides customized output to
2149   many output files - if the ASN.1 specification file consists
2150   of many modules.
2151  </para>
2152  <para>
2153   This utility is written in Tcl. Any version of Tcl should work.
2154  </para>
2155  </refsect1>
2156    <refsect1>
2157  <title>OPTIONS</title>
2158  <variablelist>
2159   <varlistentry><term><literal moreinfo="none">-v </literal>
2160 </term>
2161    <listitem>
2162     <para>
2163      Makes the ASN.1 compiler print more verbose about the
2164      various stages of operations.
2165     </para>
2166    </listitem>
2167   </varlistentry>
2168
2169   <varlistentry><term><literal moreinfo="none">-c </literal>
2170     <replaceable>cfile</replaceable></term>
2171    <listitem><para>
2172      Specifies the name of the C/C++ file with encoders/decoders.
2173     </para></listitem>
2174   </varlistentry>
2175
2176   <varlistentry><term><literal moreinfo="none">-h </literal>
2177     <replaceable>hfile</replaceable></term>
2178    <listitem><para>
2179      Specifies the name of header file with definitions.
2180     </para></listitem>
2181   </varlistentry>
2182
2183   <varlistentry><term><literal moreinfo="none">-p </literal>
2184     <replaceable>pfile</replaceable></term>
2185    <listitem><para>
2186      Specifies the name of the a private header file with
2187      definitions. By default all definitions are put
2188      in header file (option -h).
2189     </para></listitem>
2190   </varlistentry>
2191
2192   <varlistentry><term><literal moreinfo="none">-d </literal>
2193     <replaceable>dfile</replaceable></term>
2194    <listitem><para>
2195      Specifies the name of a definitions file.
2196     </para></listitem>
2197   </varlistentry>
2198
2199   <varlistentry><term><literal moreinfo="none">-I </literal>
2200     <replaceable>iout</replaceable></term>
2201    <listitem><para>
2202      Specifies first part of directory in which header files
2203      are written.
2204     </para></listitem>
2205   </varlistentry>
2206
2207   <varlistentry><term><literal moreinfo="none">-i </literal>
2208     <replaceable>idir</replaceable></term>
2209    <listitem><para>
2210      Specifies second part of directory in which header files
2211      are written.
2212     </para></listitem>
2213   </varlistentry>
2214
2215   <varlistentry><term><literal moreinfo="none">-m </literal>
2216     <replaceable>module</replaceable></term>
2217    <listitem><para>
2218      Specifies that ASN.1 compiler should only process the
2219      module given. If this option is not specified,
2220      all modules in the ASN.1 file are processed.
2221     </para></listitem>
2222   </varlistentry>
2223
2224  </variablelist>
2225 </refsect1>
2226 <refsect1><title>DEFINITIONS FILE</title>
2227  <para>
2228   The definitions file is really a Tcl script but follows
2229   traditional rules for Shell like configuration files.
2230   That is # denotes the beginning of a comment. Definitions
2231   are line oriented. The definitions files usually consists of
2232   a series of variable assignments of the form:
2233  </para>
2234  <para>
2235   <literal moreinfo="none">set</literal> <replaceable>name</replaceable> <replaceable>value</replaceable>
2236  </para>
2237  <para>
2238   Available variables are:
2239   <variablelist>
2240
2241    <varlistentry><term><literal moreinfo="none">default-prefix</literal></term>
2242     <listitem><para>
2243       Sets prefix for names in the produced output.
2244       The value consists of three tokens: C function prefix,
2245       C typedef prefix and preprocessor prefix respectively.
2246      </para></listitem>
2247    </varlistentry>
2248
2249    <varlistentry><term><literal moreinfo="none">prefix(</literal><replaceable>module</replaceable><literal moreinfo="none">)</literal></term>
2250     <listitem><para>
2251       This value sets prefix values for module
2252       <replaceable>module</replaceable>.
2253       The value has same form as <literal moreinfo="none">default-prefix</literal>.
2254      </para></listitem>
2255    </varlistentry>
2256
2257    <varlistentry><term><literal moreinfo="none">filename(</literal><replaceable>module</replaceable><literal moreinfo="none">)</literal></term>
2258     <listitem><para>
2259       Specifies filename for C/header file for module
2260       <replaceable>module</replaceable>.
2261      </para></listitem>
2262    </varlistentry>
2263
2264    <varlistentry><term><literal moreinfo="none">init(</literal><replaceable>module</replaceable><literal moreinfo="none">,h)</literal></term>
2265     <listitem><para>
2266       Code fragment to be put in first part of public header for module
2267    <replaceable>module</replaceable>.
2268      </para></listitem>
2269    </varlistentry>
2270
2271    <varlistentry><term><literal moreinfo="none">body(</literal><replaceable>module</replaceable><literal moreinfo="none">,h)</literal></term>
2272     <listitem><para>
2273       Code fragment to be put in last part of public header for module
2274    <replaceable>module</replaceable> (trailer).
2275      </para></listitem>
2276    </varlistentry>
2277
2278    <varlistentry><term><literal moreinfo="none">init(</literal><replaceable>module</replaceable><literal moreinfo="none">,c)</literal></term>
2279     <listitem><para>
2280       Code fragment to be put in first part of C based encoder/decoder for
2281       module <replaceable>module</replaceable>.
2282      </para></listitem>
2283    </varlistentry>
2284
2285    <varlistentry><term><literal moreinfo="none">body(</literal><replaceable>module</replaceable><literal moreinfo="none">,c)</literal></term>
2286     <listitem><para>
2287       Code fragment to be put in last part of C based encoder/decoder for
2288       module <replaceable>module</replaceable> (trailer).
2289      </para></listitem>
2290    </varlistentry>
2291
2292    <varlistentry><term><literal moreinfo="none">map(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">)</literal></term>
2293     <listitem><para>
2294       Maps ASN.1 type in module <replaceable>module</replaceable>
2295       of <replaceable>name</replaceable> to value.
2296      </para></listitem>
2297    </varlistentry>
2298
2299    <varlistentry><term><literal moreinfo="none">membermap(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">,</literal><replaceable>member</replaceable><literal moreinfo="none">)</literal></term>
2300     <listitem><para>
2301       Maps member <replaceable>member</replaceable> in SEQUENCE/CHOICE of
2302       <replaceable>name</replaceable> in module
2303       <replaceable>module</replaceable> to value.
2304       The value consists of one or two tokens.
2305       First token is name of C preprocessor part. Second token
2306       is resulting C member name. If second token is omitted
2307       the value (one token) is both preprocessor part and
2308       C <literal moreinfo="none">struct</literal>,<literal moreinfo="none">union</literal>.
2309      </para></listitem>
2310    </varlistentry>
2311
2312    <varlistentry><term><literal moreinfo="none">unionmap(</literal><replaceable>module</replaceable><literal moreinfo="none">,</literal><replaceable>name</replaceable><literal moreinfo="none">,</literal><replaceable>member</replaceable><literal moreinfo="none">)</literal></term>
2313     <listitem><para>
2314       Maps member <replaceable>member</replaceable> in CHOICE of
2315       <replaceable>name</replaceable> in module
2316       <replaceable>module</replaceable> to value.
2317       Value consists of to or three tokens. The first token
2318       is name of the integer in the <literal moreinfo="none">union</literal> that
2319       is used as selector for the <literal moreinfo="none">union</literal> itself.
2320       The second token is name of the <literal moreinfo="none">union</literal>.
2321       The third token overrides the name of the CHOICE member;
2322       if omitted the member name is used.
2323      </para></listitem>
2324    </varlistentry>
2325   </variablelist>
2326  </para>
2327 </refsect1>
2328 <refsect1><title>FILES</title>
2329  <para>
2330   <filename moreinfo="none">/usr/share/yaz/z39.50/z.tcl</filename>
2331  </para>
2332  <para>
2333   <filename moreinfo="none">/usr/share/yaz/z39.50/*.asn</filename>
2334  </para>
2335 </refsect1>
2336 <refsect1><title>SEE ALSO</title>
2337  <para>
2338   <citerefentry>
2339    <refentrytitle>yaz</refentrytitle>
2340    <manvolnum>7</manvolnum></citerefentry>
2341  </para>
2342  <para>
2343   Section "The ODR Module" in the YAZ manual.
2344  </para>
2345 </refsect1>
2346</refentry>
2347<!--Generated by stripref.xsl . Do not edit-->
2348<refentry id="yaz-marcdump">
2349 <refentryinfo>
2350  <productname class="trade">YAZ</productname>
2351  <productnumber>5.14.3</productnumber>
2352  <info><orgname>Index Data</orgname></info>
2353 </refentryinfo>
2354
2355 <refmeta>
2356  <refentrytitle>yaz-marcdump</refentrytitle>
2357  <manvolnum>1</manvolnum>
2358  <refmiscinfo class="manual">Commands</refmiscinfo>
2359 </refmeta>
2360
2361 <refnamediv>
2362  <refname>yaz-marcdump</refname>
2363  <refpurpose>MARC record dump utility</refpurpose>
2364 </refnamediv>
2365
2366 <refsynopsisdiv>
2367  <cmdsynopsis sepchar=" ">
2368   <command moreinfo="none">yaz-marcdump</command>
2369   <arg choice="opt" rep="norepeat"><option>-i <replaceable>format</replaceable></option></arg>
2370   <arg choice="opt" rep="norepeat"><option>-o <replaceable>format</replaceable></option></arg>
2371   <arg choice="opt" rep="norepeat"><option>-f <replaceable>from</replaceable></option></arg>
2372   <arg choice="opt" rep="norepeat"><option>-t <replaceable>to</replaceable></option></arg>
2373   <arg choice="opt" rep="norepeat"><option>-l <replaceable>spec</replaceable></option></arg>
2374   <arg choice="opt" rep="norepeat"><option>-c <replaceable>cfile</replaceable></option></arg>
2375   <arg choice="opt" rep="norepeat"><option>-s <replaceable>prefix</replaceable></option></arg>
2376   <arg choice="opt" rep="norepeat"><option>-C <replaceable>size</replaceable></option></arg>
2377   <arg choice="opt" rep="norepeat"><option>-n</option></arg>
2378   <arg choice="opt" rep="norepeat"><option>-p</option></arg>
2379   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
2380   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
2381   <arg choice="opt" rep="repeat">file</arg>
2382  </cmdsynopsis>
2383 </refsynopsisdiv>
2384
2385 <refsect1><title>DESCRIPTION</title>
2386  <para>
2387   <command moreinfo="none">yaz-marcdump</command> reads MARC records from one or
2388   more files.
2389   It parses each record and supports output in line-format,
2390   ISO2709,
2391   <ulink url="http://www.loc.gov/standards/marcxml/">MARCXML</ulink>,
2392   <ulink url="http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json/">MARC-in-JSON</ulink>,
2393   <ulink url="http://www.loc.gov/standards/iso25577/">MarcXchange</ulink>
2394   as well as Hex output.
2395  </para>
2396  <para>
2397   This utility parses records ISO2709(raw MARC), line format, MARC-in-JSON
2398   format as well as XML if that is structured as MARCXML/MarcXchange.
2399  </para>
2400  <para>
2401   MARC-in-JSON encoding/decoding is supported in YAZ 5.0.5 and later.
2402  </para>
2403  <note>
2404   <para>
2405    As of YAZ 2.1.18, OAI-MARC is no longer supported.
2406    OAI-MARC is deprecated. Use MARCXML instead.
2407   </para>
2408  </note>
2409  <para>
2410   By default, each record is written to standard output in a line
2411   format with newline for each field, $x for each subfield x.
2412   The output format may be changed with option <literal moreinfo="none">-o</literal>,
2413  </para>
2414  <para>
2415   <command moreinfo="none">yaz-marcdump</command> can also be requested to perform
2416   character set conversion of each record.
2417  </para>
2418 </refsect1>
2419
2420 <refsect1><title>OPTIONS</title>
2421
2422  <variablelist>
2423   <varlistentry>
2424    <term>-i <replaceable>format</replaceable></term>
2425    <listitem><para>
2426      Specifies input format. Must be one of
2427      <literal moreinfo="none">marcxml</literal>, <literal moreinfo="none">marc</literal> (ISO2709),
2428      <literal moreinfo="none">marcxchange</literal> (ISO25577),
2429      <literal moreinfo="none">line</literal> (line mode MARC),
2430      <literal moreinfo="none">turbomarc</literal> (Turbo MARC),
2431      or <literal moreinfo="none">json</literal> (MARC-in-JSON).
2432     </para></listitem>
2433   </varlistentry>
2434
2435   <varlistentry>
2436    <term>-o <replaceable>format</replaceable></term>
2437    <listitem><para>
2438      Specifies output format. Must be one of
2439      <literal moreinfo="none">marcxml</literal>, <literal moreinfo="none">marc</literal> (ISO2709),
2440      <literal moreinfo="none">marcxchange</literal> (ISO25577),
2441      <literal moreinfo="none">line</literal> (line mode MARC),
2442      <literal moreinfo="none">turbomarc</literal> (Turbo MARC),
2443      or <literal moreinfo="none">json</literal> (MARC-in-JSON).
2444     </para></listitem>
2445   </varlistentry>
2446
2447   <varlistentry>
2448    <term>-f <replaceable>from</replaceable></term>
2449    <listitem><para>
2450      Specify the character set <replaceable>from</replaceable>
2451      of the input MARC record.
2452      Should be used in conjunction with option <literal moreinfo="none">-t</literal>.
2453      Refer to the yaz-iconv man page for supported character sets.
2454     </para></listitem>
2455   </varlistentry>
2456
2457   <varlistentry>
2458    <term>-t <replaceable>to</replaceable></term>
2459    <listitem><para>
2460      Specify the character set <replaceable>of</replaceable>
2461      of the output.
2462      Should be used in conjunction with option <literal moreinfo="none">-f</literal>.
2463      Refer to the yaz-iconv man page for supported character sets.
2464     </para></listitem>
2465   </varlistentry>
2466
2467   <varlistentry>
2468    <term>-l <replaceable>leaderspec</replaceable></term>
2469    <listitem><para>
2470      Specify a simple modification string for MARC leader. The
2471      <replaceable>leaderspec</replaceable> is a list of pos=value
2472      pairs, where pos is an integer offset (0 - 23) for leader. Value
2473      is either a quoted string or an integer (character value in decimal).
2474      Pairs are comma separated. For example, to set leader at offset 9
2475      to a, use <literal moreinfo="none">9='a'</literal>.
2476     </para></listitem>
2477   </varlistentry>
2478
2479   <varlistentry>
2480    <term>-s <replaceable>prefix</replaceable></term>
2481    <listitem><para>
2482      Writes a chunk of records to a separate file with prefix given,
2483      i.e. splits a record batch into files with only at most
2484      "chunk" ISO2709 record per file. By default chunk is 1 (one record
2485      per file). See option <literal moreinfo="none">-C</literal>.
2486     </para></listitem>
2487   </varlistentry>
2488
2489   <varlistentry>
2490    <term>-C <replaceable>chunksize</replaceable></term>
2491    <listitem><para>
2492      Specifies chunk size; to be used conjunction with option
2493      <literal moreinfo="none">-s</literal>.
2494     </para></listitem>
2495   </varlistentry>
2496
2497   <varlistentry>
2498    <term>-p</term>
2499    <listitem><para>
2500      Makes yaz-marcdump prints record number and input file offset
2501      of each record read.
2502     </para></listitem>
2503   </varlistentry>
2504
2505   <varlistentry>
2506    <term>-n</term>
2507    <listitem><para>
2508      MARC output is omitted so that MARC input is only checkecd.
2509     </para></listitem>
2510   </varlistentry>
2511
2512   <varlistentry>
2513    <term>-v</term>
2514    <listitem><para>
2515      Writes more information about the parsing process.
2516      Useful if you have ill-formatted ISO2709 records as input.
2517     </para></listitem>
2518   </varlistentry>
2519
2520   <varlistentry>
2521    <term>-V</term>
2522    <listitem><para>
2523      Prints YAZ version.
2524     </para></listitem>
2525   </varlistentry>
2526
2527  </variablelist>
2528 </refsect1>
2529
2530 <refsect1><title>EXAMPLES</title>
2531  <para>
2532   The following command converts MARC21/USMARC in MARC-8 encoding to
2533   MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'.
2534   Both input and output records are ISO2709 encoded.
2535   <screen format="linespecific">
2536    yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw &gt;marc21.utf8.raw
2537   </screen>
2538  </para>
2539  <para>
2540   The same records may be converted to MARCXML instead in UTF-8:
2541   <screen format="linespecific">
2542    yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw &gt;marcxml.xml
2543   </screen>
2544  </para>
2545
2546  <para>
2547   Turbo MARC is a compact XML notation with same semantics as
2548   MARCXML, but which allows for faster processing via XSLT. In order
2549   to generate Turbo MARC records encoded in UTF-8 from MARC21 (ISO), one
2550   could use:
2551   <screen format="linespecific">
2552    yaz-marcdump -f MARC8 -t UTF8 -o turbomarc -i marc marc21.raw &gt;out.xml
2553   </screen>
2554  </para>
2555 </refsect1>
2556
2557 <refsect1><title>FILES</title>
2558  <para>
2559   <filename moreinfo="none"><replaceable>prefix</replaceable>/bin/yaz-marcdump</filename>
2560  </para>
2561  <para>
2562   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/marcdisp.h</filename>
2563  </para>
2564  </refsect1>
2565 <refsect1><title>SEE ALSO</title>
2566  <para>
2567   <citerefentry>
2568    <refentrytitle>yaz</refentrytitle>
2569    <manvolnum>7</manvolnum>
2570   </citerefentry>
2571  </para>
2572  <para>
2573   <citerefentry>
2574    <refentrytitle>yaz-iconv</refentrytitle>
2575    <manvolnum>1</manvolnum>
2576   </citerefentry>
2577  </para>
2578 </refsect1>
2579</refentry>
2580<!--Generated by stripref.xsl . Do not edit-->
2581<refentry id="yaz-iconv">
2582 <refentryinfo>
2583  <productname class="trade">YAZ</productname>
2584  <productnumber>5.14.3</productnumber>
2585  <info><orgname>Index Data</orgname></info>
2586 </refentryinfo>
2587
2588 <refmeta>
2589  <refentrytitle>yaz-iconv</refentrytitle>
2590  <manvolnum>1</manvolnum>
2591  <refmiscinfo class="manual">Commands</refmiscinfo>
2592 </refmeta>
2593
2594 <refnamediv>
2595  <refname>yaz-iconv</refname>
2596  <refpurpose>YAZ Character set conversion utility</refpurpose>
2597 </refnamediv>
2598
2599 <refsynopsisdiv>
2600  <cmdsynopsis sepchar=" ">
2601   <command moreinfo="none">yaz-iconv</command>
2602   <arg choice="opt" rep="norepeat"><option>-f <replaceable>from</replaceable></option></arg>
2603   <arg choice="opt" rep="norepeat"><option>-t <replaceable>to</replaceable></option></arg>
2604   <arg choice="opt" rep="norepeat"><option>-v</option></arg>
2605   <arg choice="opt" rep="repeat">file</arg>
2606  </cmdsynopsis>
2607 </refsynopsisdiv>
2608
2609 <refsect1><title>DESCRIPTION</title>
2610  <para>
2611   <command moreinfo="none">yaz-iconv</command> converts data in file in character
2612   set specified by <replaceable>from</replaceable> to output in
2613   character set as specified by <replaceable>to</replaceable>.
2614  </para>
2615  <para>
2616   This <command moreinfo="none">yaz-iconv</command> utility similar to the
2617   <command moreinfo="none">iconv</command> found on many POSIX systems (Glibc, Solaris, etc).
2618  </para>
2619  <para>
2620   If no <replaceable>file</replaceable> is specified,
2621   <command moreinfo="none">yaz-iconv</command> reads from standard input.
2622  </para>
2623 </refsect1>
2624
2625 <refsect1><title>OPTIONS</title>
2626
2627  <variablelist>
2628   <varlistentry>
2629    <term>-f<replaceable>from</replaceable>]</term>
2630    <listitem><para>
2631      Specify the character set <replaceable>from</replaceable>
2632      of the input file.
2633      Should be used in conjunction with option <literal moreinfo="none">-t</literal>.
2634     </para></listitem>
2635   </varlistentry>
2636
2637   <varlistentry>
2638    <term>-t<replaceable>to</replaceable>]</term>
2639    <listitem><para>
2640      Specify the character set <replaceable>of</replaceable>
2641      of the output.
2642      Should be used in conjunction with option <literal moreinfo="none">-f</literal>.
2643     </para></listitem>
2644   </varlistentry>
2645
2646   <varlistentry>
2647    <term>-v</term>
2648    <listitem><para>
2649      Print more information about the conversion process.
2650     </para></listitem>
2651   </varlistentry>
2652
2653  </variablelist>
2654 </refsect1>
2655
2656 <refsect1><title>ENCODINGS</title>
2657  <para>
2658   The yaz-iconv command and the API as defined in
2659   <filename moreinfo="none">yaz/yaz-iconv.h</filename> is a wrapper for the
2660   library system call iconv. But YAZ' iconv utility also implements
2661   conversions on its own. The table below lists characters sets (or encodings).
2662   that are supported by YAZ. Each character set is marked with either
2663   <emphasis>encode</emphasis> or <emphasis>decode</emphasis>. If
2664   an encoding is encode-enabled YAZ may convert <emphasis>to</emphasis>
2665   to the designated encoding. If an encoding is decode-enabled, YAZ
2666   may convert <emphasis>from</emphasis> the designated encoding.
2667  </para>
2668  <variablelist>
2669   <varlistentry>
2670    <term>marc8 (encode, decode)</term>
2671    <listitem>
2672     <para>
2673      The <ulink url="http://www.loc.gov/marc/specifications/speccharmarc8.html">MARC8</ulink> encoding as defined by
2674      the Library of Congress. Most MARC21/USMARC records use this encoding.
2675     </para>
2676    </listitem>
2677   </varlistentry>
2678   <varlistentry>
2679    <term>marc8s (encode, decode)</term>
2680    <listitem>
2681     <para>
2682      Like MARC8 but with conversion prefers non-combined characters
2683      in the Latin-1 plane over combined characters.
2684     </para>
2685    </listitem>
2686   </varlistentry>
2687   <varlistentry>
2688    <term>marc8lossy (encode)</term>
2689    <listitem>
2690     <para>
2691      Lossy encoding of MARC-8.
2692     </para>
2693    </listitem>
2694   </varlistentry>
2695   <varlistentry>
2696    <term>marc8lossless (encode)</term>
2697    <listitem>
2698     <para>
2699      Lossless encoding of MARC8.
2700     </para>
2701    </listitem>
2702   </varlistentry>
2703   <varlistentry>
2704    <term>utf8 (encode, decode)</term>
2705    <listitem>
2706     <para>
2707      The most commonly used UNICODE encoding on the Internet.
2708     </para>
2709    </listitem>
2710   </varlistentry>
2711   <varlistentry>
2712    <term>iso8859-1 (encode, decode)</term>
2713    <listitem>
2714     <para>
2715      ISO-8859-1, AKA Latin-1.
2716     </para>
2717    </listitem>
2718   </varlistentry>
2719   <varlistentry>
2720    <term>iso5426 (decode)</term>
2721    <listitem>
2722     <para>
2723      ISO 5426. Some MARC records (UNIMARC) use this encoding.
2724     </para>
2725    </listitem>
2726   </varlistentry>
2727   <varlistentry>
2728    <term>iso5428:1984 (encode, decode)</term>
2729    <listitem>
2730     <para>
2731      ISO 5428:1984.
2732     </para>
2733    </listitem>
2734   </varlistentry>
2735   <varlistentry>
2736    <term>advancegreek (encode, decode)</term>
2737    <listitem>
2738     <para>
2739      An encoding for Greek in use by some vendors (Advance).
2740     </para>
2741    </listitem>
2742   </varlistentry>
2743   <varlistentry>
2744    <term>danmarc (decode)</term>
2745    <listitem>
2746     <para>
2747      <ulink url="http://www.kat-format.dk/danMARC2/Danmarc2.4.htm">Danmarc (in danish)</ulink> is
2748      an encoding based on UNICODE which is used for DanMARC2 records.
2749     </para>
2750    </listitem>
2751   </varlistentry>
2752  </variablelist>
2753 </refsect1>
2754
2755 <refsect1><title>EXAMPLES</title>
2756  <para>
2757   The following command converts from ISO-8859-1 (Latin-1) to
2758   UTF-8.
2759   <screen format="linespecific">
2760    yaz-iconv -f ISO-8859-1 -t UTF-8 &lt;input.lst &gt;output.lst
2761   </screen>
2762  </para>
2763 </refsect1>
2764
2765 <refsect1><title>FILES</title>
2766  <para>
2767   <filename moreinfo="none"><replaceable>prefix</replaceable>/bin/yaz-iconv</filename>
2768  </para>
2769  <para>
2770   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/yaz-iconv.h</filename>
2771  </para>
2772 </refsect1>
2773 <refsect1><title>SEE ALSO</title>
2774  <para>
2775   yaz(7)
2776   iconv(1)
2777  </para>
2778 </refsect1>
2779</refentry>
2780<!--Generated by stripref.xsl . Do not edit-->
2781<refentry id="yaz-log">
2782 <refentryinfo>
2783  <productname class="trade">YAZ</productname>
2784  <productnumber>5.14.3</productnumber>
2785  <info><orgname>Index Data</orgname></info>
2786 </refentryinfo>
2787
2788 <refmeta>
2789  <refentrytitle>yaz-log</refentrytitle>
2790  <manvolnum>7</manvolnum>
2791  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
2792 </refmeta>
2793
2794 <refnamediv>
2795  <refname>yaz-log</refname>
2796  <refpurpose>Log handling in all yaz-based programs</refpurpose>
2797 </refnamediv>
2798
2799 <refsynopsisdiv>
2800  <cmdsynopsis sepchar=" ">
2801   <command moreinfo="none">yaz-XXXX</command>
2802   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel,...</replaceable></option></arg>
2803   <arg choice="opt" rep="norepeat"><option>-l <replaceable>logfile</replaceable></option></arg>
2804  </cmdsynopsis>
2805 </refsynopsisdiv>
2806
2807 <refsect1><title>DESCRIPTION</title>
2808  <para>
2809   All YAZ-based programs use a common log subsystem, and should support
2810   common command line options for controlling it. This man page documents
2811   those.
2812  </para>
2813  <para>
2814  </para>
2815 </refsect1>
2816
2817 <refsect1><title>OPTIONS</title>
2818
2819  <variablelist>
2820   <varlistentry>
2821    <term>-l<replaceable> logfile</replaceable></term>
2822    <listitem>
2823     <para>
2824      Specify the file where the log is to be written. If none is specified,
2825      <filename moreinfo="none">stderr</filename> is used. The log is appended to this file.
2826      If the file grows overly large, it is silently rotated: It is renamed to
2827      <replaceable>logfile</replaceable>.1,
2828      <replaceable>logfile</replaceable>.2, .., 9
2829      (old such file is deleted), and a
2830      new file is opened. The limit defaults to 1GB, but can be set by the
2831      program.
2832      The rotating limit can be specified with option <literal moreinfo="none">-r</literal>
2833      for the YAZ frontend server (yaz-ztest).
2834     </para>
2835     <para>
2836      Rotation can also be implicitly enabled by using a filename
2837      which gets changed for a given date, due to substitutions as
2838      given by the strftime(3) function.
2839     </para>
2840    </listitem>
2841   </varlistentry>
2842
2843   <varlistentry>
2844    <term>-v<replaceable> loglevel</replaceable></term>
2845    <listitem><para>
2846      Specify the logging level. The argument is a set of log level names,
2847      separated by commas (no whitespace!), optionally preceded by a '-' to
2848      negate that level. Most programs have their own default, often
2849      containing <literal moreinfo="none">fatal,warn,log</literal>, and some
2850      application-specific values. The default list can be cleared with the
2851      word <literal moreinfo="none">none</literal>, or individual bits can be removed by
2852      prefixing them with a dash '-'.
2853     </para></listitem>
2854   </varlistentry>
2855
2856  </variablelist>
2857 </refsect1>
2858
2859 <refsect1><title>LOG LEVELS TO CONTROL LOGGING</title>
2860  <para>
2861   Some of the log levels control the way the log is written.
2862  </para>
2863  <para>
2864   <literal moreinfo="none">flush</literal> causes the log to be flushed after every write.
2865   This can have serious implications to performance, and should not be used
2866   in production. On the other hand, when debugging a program crash, this can
2867   be extremely useful. The option <literal moreinfo="none">debug</literal> implies
2868   <literal moreinfo="none">flush</literal> as well.
2869  </para>
2870  <para>
2871   <literal moreinfo="none">notime</literal> prevents the writing of time stamps. This is
2872   intended for automatic test scripts, which should produce predictable log
2873   files that are easy to compare.
2874  </para>
2875
2876 </refsect1>
2877
2878 <refsect1><title>GENERAL LOG LEVELS IN YAZ ITSELF</title>
2879  <para>
2880   YAZ itself uses the following log levels:
2881  </para>
2882  <para>
2883   <literal moreinfo="none">fatal</literal> for fatal errors, that prevent further execution
2884   of the program.
2885  </para>
2886  <para>
2887   <literal moreinfo="none">warn</literal> for warnings about things that should be corrected.
2888  </para>
2889  <para>
2890   <literal moreinfo="none">debug</literal> for debugging. This flag may be used temporarily
2891   when developing or debugging yaz, or a program that uses yaz. It is
2892   practically deprecated, you should be defining and using your own log
2893   levels (see below).
2894  </para>
2895  <para>
2896   <literal moreinfo="none">all</literal> turns on almost all hard-coded log levels.
2897  </para>
2898  <para>
2899   <literal moreinfo="none">loglevel</literal> logs information about the log levels used by
2900   the program. Every time the log level is changed, lists all bits that are
2901   on. Every time a module asks for its log bits, this is logged. This can be
2902   used for getting an idea of what log levels are available in any program
2903   that uses yaz-log. Start the program with <literal moreinfo="none">-v
2904   none,loglevel</literal>, and do some common operations with it. Another way
2905   is to grep for <function moreinfo="none">yaz_log_module_level</function> in the source
2906   code, as in
2907   <screen format="linespecific">
2908      find . -name '*.[ch]' -print |
2909         xargs grep yaz_log_module_level |
2910         grep '"' |
2911         cut -d'"' -f2 |
2912         sort -u
2913   </screen>
2914  </para>
2915  <para>
2916   <literal moreinfo="none">eventl</literal>, <literal moreinfo="none">malloc</literal>,
2917   <literal moreinfo="none">nmem</literal>, <literal moreinfo="none">odr</literal> are used internally for
2918   debugging yaz.
2919  </para>
2920  <para>
2921  </para>
2922 </refsect1>
2923
2924 <refsect1><title>LOG LEVELS FOR CLIENTS</title>
2925  <para>
2926   <literal moreinfo="none">zoom</literal> logs the calls to the zoom API, which may be useful
2927   in debugging client applications.
2928  </para>
2929 </refsect1>
2930
2931 <refsect1><title>LOG LEVELS FOR SERVERS</title>
2932  <para>
2933   <literal moreinfo="none">server</literal> logs the server functions on a high level,
2934   starting up, listening on a port, etc.
2935  </para>
2936  <para>
2937   <literal moreinfo="none">session</literal> logs individual sessions (connections).
2938  </para>
2939  <para>
2940   <literal moreinfo="none">request</literal> logs a one-liner for each request (init, search,
2941   etc).
2942  </para>
2943  <para>
2944   <literal moreinfo="none">requestdetail</literal> logs the details of every request, before
2945   it is passed to the back-end, and the results received from it.
2946  </para>
2947  <para>
2948   Each server program (zebra, etc) is supposed to define its own log levels
2949   in addition to these. As they depend on the server in question, they can
2950   not be described here. See above how to find out about them.
2951  </para>
2952 </refsect1>
2953
2954 <refsect1><title>LOGGING EXAMPLES</title>
2955  <para>
2956   See what log levels yaz-ztest is using:
2957   <screen format="linespecific">
2958    yaz-ztest -1 -v none,loglevel
2959    14:43:29-23/11 [loglevel] Setting log level to 4096 = 0x00001000
2960    14:43:29-23/11 [loglevel] Static  log bit 00000001 'fatal' is off
2961    14:43:29-23/11 [loglevel] Static  log bit 00000002 'debug' is off
2962    14:43:29-23/11 [loglevel] Static  log bit 00000004 'warn' is off
2963    14:43:29-23/11 [loglevel] Static  log bit 00000008 'log' is off
2964    14:43:29-23/11 [loglevel] Static  log bit 00000080 'malloc' is off
2965    14:43:29-23/11 [loglevel] Static  log bit 00000800 'flush' is off
2966    14:43:29-23/11 [loglevel] Static  log bit 00001000 'loglevel' is ON
2967    14:43:29-23/11 [loglevel] Static  log bit 00002000 'server' is off
2968    14:43:29-23/11 [loglevel] Dynamic log bit 00004000 'session' is off
2969    14:43:29-23/11 [loglevel] Dynamic log bit 00008000 'request' is off
2970    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
2971    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x2000 for 'server'
2972    14:44:13-23/11 yaz-ztest [loglevel] returning NO log bit for 'eventl'
2973    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
2974    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x8000 for 'request'
2975    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'requestdetail'
2976    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'odr'
2977    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'ztest'
2978   </screen>
2979  </para>
2980  <para>
2981   See the details of the requests for yaz-ztest
2982   <screen format="linespecific">
2983   ./yaz-ztest -1 -v requestdetail
2984   14:45:35-23/11 yaz-ztest [server] Adding static Z3950 listener on tcp:@:9999
2985   14:45:35-23/11 yaz-ztest [server] Starting server ./yaz-ztest pid=32200
2986   14:45:38-23/11 yaz-ztest [session] Starting session from tcp:127.0.0.1 (pid=32200)
2987   14:45:38-23/11 yaz-ztest [requestdetail] Got initRequest
2988   14:45:38-23/11 yaz-ztest [requestdetail] Id:        81
2989   14:45:38-23/11 yaz-ztest [requestdetail] Name:      YAZ
2990   14:45:38-23/11 yaz-ztest [requestdetail] Version:   2.0.28
2991   14:45:38-23/11 yaz-ztest [requestdetail] Negotiated to v3: srch prst del extendedServices namedresults scan sort
2992   14:45:38-23/11 yaz-ztest [request] Init from 'YAZ' (81) (ver 2.0.28) OK
2993   14:45:39-23/11 yaz-ztest [requestdetail] Got SearchRequest.
2994   14:45:39-23/11 yaz-ztest [requestdetail] ResultSet '1'
2995   14:45:39-23/11 yaz-ztest [requestdetail] Database 'Default'
2996   14:45:39-23/11 yaz-ztest [requestdetail] RPN query. Type: Bib-1
2997   14:45:39-23/11 yaz-ztest [requestdetail]  term 'foo' (general)
2998   14:45:39-23/11 yaz-ztest [requestdetail] resultCount: 7
2999   14:45:39-23/11 yaz-ztest [request] Search Z: @attrset Bib-1 foo  OK:7 hits
3000   14:45:41-23/11 yaz-ztest [requestdetail] Got PresentRequest.
3001   14:45:41-23/11 yaz-ztest [requestdetail] Request to pack 1+1 1
3002   14:45:41-23/11 yaz-ztest [requestdetail] pms=1048576, mrs=1048576
3003   14:45:41-23/11 yaz-ztest [request] Present: [1] 1+1  OK 1 records returned
3004   </screen>
3005  </para>
3006 </refsect1>
3007
3008 <refsect1><title>LOG FILENAME EXAMPLES</title>
3009  <para>
3010   A file with format my_YYYYMMDD.log is where Y, M, D is year, month, and day
3011   digits is given as follows
3012   <literal moreinfo="none">-l my_%Y%m%d.log</literal> . And since the filename
3013   is depending on day, rotaion will occur on midnight.
3014  </para>
3015  <para>
3016   A weekly log could be specified as
3017   <literal moreinfo="none">-l my_%Y%U.log</literal>.
3018  </para>
3019 </refsect1>
3020
3021 <refsect1><title>FILES</title>
3022  <para>
3023   <filename moreinfo="none"><replaceable>prefix</replaceable>/include/yaz/log.h</filename>
3024   <filename moreinfo="none"><replaceable>prefix</replaceable>/src/log.c</filename>
3025  </para>
3026 </refsect1>
3027 <refsect1><title>SEE ALSO</title>
3028  <para>
3029   <citerefentry>
3030    <refentrytitle>yaz</refentrytitle>
3031    <manvolnum>7</manvolnum>
3032   </citerefentry>
3033
3034   <citerefentry>
3035    <refentrytitle>yaz-ztest</refentrytitle>
3036    <manvolnum>8</manvolnum>
3037   </citerefentry>
3038
3039   <citerefentry>
3040    <refentrytitle>yaz-client</refentrytitle>
3041    <manvolnum>1</manvolnum>
3042   </citerefentry>
3043
3044   <citerefentry>
3045    <refentrytitle>strftime</refentrytitle>
3046    <manvolnum>3</manvolnum>
3047   </citerefentry>
3048  </para>
3049 </refsect1>
3050</refentry>
3051<!--Generated by stripref.xsl . Do not edit-->
3052<refentry id="yaz-illclient">
3053 <refentryinfo>
3054  <productname class="trade">YAZ</productname>
3055  <productnumber>5.14.3</productnumber>
3056  <info><orgname>Index Data</orgname></info>
3057 </refentryinfo>
3058
3059 <refmeta>
3060  <refentrytitle>yaz-illclient</refentrytitle>
3061  <manvolnum>1</manvolnum>
3062  <refmiscinfo class="manual">Commands</refmiscinfo>
3063 </refmeta>
3064
3065 <refnamediv>
3066  <refname>yaz-illclient</refname>
3067  <refpurpose>ILL client</refpurpose>
3068 </refnamediv>
3069
3070 <refsynopsisdiv>
3071  <cmdsynopsis sepchar=" ">
3072   <command moreinfo="none">yaz-illclient</command>
3073   <arg choice="opt" rep="norepeat"><option>-f <replaceable>filename</replaceable></option></arg>
3074   <arg choice="opt" rep="norepeat"><option>-v <replaceable>loglevel</replaceable></option></arg>
3075   <arg choice="opt" rep="repeat"><option>-D</option> <replaceable>name=value</replaceable></arg>
3076   <arg choice="opt" rep="norepeat"><option>-o</option></arg>
3077   <arg choice="opt" rep="norepeat"><option>-u <replaceable>user</replaceable></option></arg>
3078   <arg choice="opt" rep="norepeat"><option>-p <replaceable>password</replaceable></option></arg>
3079   <arg choice="opt" rep="norepeat"><option>-V</option></arg>
3080   <arg choice="opt" rep="norepeat">server-addr</arg>
3081  </cmdsynopsis>
3082 </refsynopsisdiv>
3083
3084 <refsect1><title>DESCRIPTION</title>
3085  <para>
3086   <command moreinfo="none">yaz-illclient</command> is an client which sends an ISO
3087   ILL request to a remote server and decodes the response from it.
3088   Exactly one server address ( <replaceable>server-addr</replaceable> )
3089   must be specified.
3090  </para>
3091 </refsect1>
3092
3093 <refsect1><title>OPTIONS</title>
3094
3095  <variablelist>
3096   <varlistentry>
3097    <term>-f <replaceable>filename</replaceable>]</term>
3098    <listitem><para>
3099      Specify filename.
3100     </para></listitem>
3101   </varlistentry>
3102
3103   <varlistentry>
3104    <term>-v <replaceable>loglevel</replaceable>]</term>
3105    <listitem><para>
3106      Specify the log level
3107     </para></listitem>
3108   </varlistentry>
3109
3110   <varlistentry>
3111    <term>-D <replaceable>name=value</replaceable>]</term>
3112    <listitem><para>
3113      Defines name &amp; value pair.
3114     </para></listitem>
3115   </varlistentry>
3116
3117   <varlistentry>
3118    <term>-o</term>
3119    <listitem><para>
3120      Enable OCLC authentication.
3121     </para></listitem>
3122   </varlistentry>
3123
3124   <varlistentry>
3125    <term>-u <replaceable>user</replaceable>]</term>
3126    <listitem><para>
3127      Specify user.
3128     </para></listitem>
3129   </varlistentry>
3130
3131   <varlistentry>
3132    <term>-p <replaceable>password</replaceable>]</term>
3133    <listitem><para>
3134      Specify password.
3135     </para></listitem>
3136   </varlistentry>
3137
3138   <varlistentry>
3139    <term>-V</term>
3140    <listitem><para>
3141      Show yaz-illclient version.
3142     </para></listitem>
3143   </varlistentry>
3144
3145  </variablelist>
3146 </refsect1>
3147
3148 <refsect1><title>EXAMPLES</title>
3149  <para>
3150   None yet.
3151  </para>
3152 </refsect1>
3153
3154 <refsect1><title>FILES</title>
3155  <para>
3156   None yet.
3157  </para>
3158 </refsect1>
3159 <refsect1><title>SEE ALSO</title>
3160  <para>
3161   yaz(7)
3162  </para>
3163 </refsect1>
3164</refentry>
3165<!--Generated by stripref.xsl . Do not edit-->
3166<refentry id="yaz-icu">
3167 <refentryinfo>
3168  <productname class="trade">YAZ</productname>
3169  <productnumber>5.14.3</productnumber>
3170  <info><orgname>Index Data</orgname></info>
3171 </refentryinfo>
3172
3173 <refmeta>
3174  <refentrytitle>yaz-icu</refentrytitle>
3175  <manvolnum>1</manvolnum>
3176  <refmiscinfo class="manual">Commands</refmiscinfo>
3177 </refmeta>
3178
3179 <refnamediv>
3180  <refname>yaz-icu</refname>
3181  <refpurpose>YAZ ICU utility</refpurpose>
3182 </refnamediv>
3183
3184 <refsynopsisdiv>
3185  <cmdsynopsis sepchar=" ">
3186   <command moreinfo="none">yaz-icu</command>
3187   <arg choice="opt" rep="norepeat">-c <replaceable>config</replaceable></arg>
3188   <arg choice="opt" rep="norepeat">-p <replaceable>opt</replaceable></arg>
3189   <arg choice="opt" rep="norepeat">-s</arg>
3190   <arg choice="opt" rep="norepeat">-x</arg>
3191   <arg choice="opt" rep="norepeat">infile</arg>
3192  </cmdsynopsis>
3193 </refsynopsisdiv>
3194
3195 <refsect1><title>DESCRIPTION</title>
3196  <para>
3197   <command moreinfo="none">yaz-icu</command> is utility which demonstrates
3198   the ICU chain module of yaz. (<filename moreinfo="none">yaz/icu.h</filename>).
3199  </para>
3200  <para>
3201    The utility can be used in two ways. It may read some text
3202    using an XML configuration for configuring ICU and show text analysis.
3203    This mode is triggered by option <literal moreinfo="none">-c</literal> which specififies
3204    the configuration to be used. The input file is read from standard
3205    input or from a file if <literal moreinfo="none">infile</literal> is specified.
3206  </para>
3207  <para>
3208    The utility may also show ICU information. This is triggered by
3209    option <literal moreinfo="none">-p</literal>.
3210  </para>
3211 </refsect1>
3212
3213 <refsect1><title>OPTIONS</title>
3214  <variablelist>
3215   <varlistentry>
3216    <term>-c <replaceable>config</replaceable></term>
3217    <listitem><para>
3218      Specifies the file containing ICU chain configuration
3219      which is XML based.
3220     </para></listitem>
3221   </varlistentry>
3222
3223   <varlistentry>
3224    <term>-p <replaceable>type</replaceable></term>
3225    <listitem><para>
3226      Specifies extra information to be printed about the ICU system.
3227      If <replaceable>type</replaceable> is <literal moreinfo="none">c</literal>
3228      then ICU converters are printed.
3229      If <replaceable>type</replaceable> is <literal moreinfo="none">l</literal>
3230      available locales are printed.
3231      If <replaceable>type</replaceable> is <literal moreinfo="none">t</literal>
3232      available transliterators are printed.
3233     </para></listitem>
3234   </varlistentry>
3235
3236   <varlistentry>
3237    <term>-s</term>
3238    <listitem><para>
3239      Specifies that output should include sort key as well. Note that
3240      sort key differs between ICU versions.
3241     </para></listitem>
3242   </varlistentry>
3243
3244   <varlistentry>
3245    <term>-x</term>
3246    <listitem><para>
3247      Specifies that output should be XML based rather than
3248      "text" based.
3249     </para></listitem>
3250   </varlistentry>
3251
3252  </variablelist>
3253 </refsect1>
3254 <refsect1><title>ICU chain configuration</title>
3255  <para>
3256   The ICU chain configuration speicifies one or more rules to convert
3257   text data into tokens. The configuration format is XML based.
3258  </para>
3259  <para>
3260   The toplevel element must be named <literal moreinfo="none">icu_chain</literal>.
3261   The <literal moreinfo="none">icu_chain</literal> element has one required attribute
3262   <literal moreinfo="none">locale</literal> which specifies the ICU locale to be used
3263   in the conversion steps.
3264  </para>
3265  <para>
3266   The <literal moreinfo="none">icu_chain</literal> element must include elements where
3267   each element specifies a conversion step. The conversion is performed
3268   in the order in which the conversion steps are specified.
3269   Each conversion element takes one attribute: <literal moreinfo="none">rule</literal>
3270   which serves as argument to the conversion step.
3271  </para>
3272  <para>
3273   The following conversion elements are available:
3274
3275   <variablelist>
3276    <varlistentry>
3277     <term>casemap</term>
3278     <listitem><para>
3279       Converts case and rule specifies how:
3280
3281       <variablelist>
3282        <varlistentry>
3283         <term>l</term>
3284         <listitem>
3285          <para>Lowercase using ICU function u_strToLower. </para>
3286         </listitem>
3287        </varlistentry>
3288
3289        <varlistentry>
3290         <term>u</term>
3291         <listitem>
3292          <para>Upper case using ICU function u_strToUpper.</para>
3293         </listitem>
3294        </varlistentry>
3295
3296        <varlistentry>
3297         <term>t</term>
3298         <listitem>
3299          <para>To title using UCU function u_strToTitle.</para>
3300         </listitem>
3301        </varlistentry>
3302
3303        <varlistentry>
3304         <term>f</term>
3305         <listitem>
3306          <para>Fold case using ICU function u_strFoldCase.</para>
3307         </listitem>
3308        </varlistentry>
3309
3310       </variablelist>
3311      </para></listitem>
3312    </varlistentry>
3313
3314    <varlistentry>
3315     <term>display</term>
3316     <listitem><para>
3317       This is a meta step which specifies that a term/token is to
3318       be displayed. This term is retrieved in an application
3319       using function icu_chain_token_display (<filename moreinfo="none">yaz/icu.h</filename>).
3320      </para></listitem>
3321    </varlistentry>
3322
3323    <varlistentry>
3324     <term>transform</term>
3325     <listitem><para>
3326       Specifies an ICU transform rule using a transliterator
3327       Identifier.
3328       The rule attribute is the transliterator Identifier.
3329       See  <ulink url="http://userguide.icu-project.org/transforms/general">ICU Transforms</ulink> for
3330       more information.
3331      </para></listitem>
3332    </varlistentry>
3333
3334    <varlistentry>
3335     <term>transliterate</term>
3336     <listitem><para>
3337       Specifies a rule-based transliterator.
3338       The rule attribute is the custom transformation rule to be used.
3339       See <ulink url="http://userguide.icu-project.org/transforms/general">ICU Transforms</ulink> for
3340       more information.
3341      </para></listitem>
3342    </varlistentry>
3343
3344    <varlistentry>
3345     <term>tokenize</term>
3346     <listitem><para>
3347       Breaks / tokenizes a string into components using
3348       ICU functions ubrk_open, ubrk_setText, .. . The rule is
3349       one of:
3350       <variablelist>
3351        <varlistentry>
3352         <term>l</term>
3353         <listitem>
3354          <para>Line. ICU: UBRK_LINE.</para>
3355         </listitem>
3356        </varlistentry>
3357
3358        <varlistentry>
3359         <term>s</term>
3360         <listitem>
3361          <para>Sentence. ICU: UBRK_SENTENCE.</para>
3362         </listitem>
3363        </varlistentry>
3364
3365        <varlistentry>
3366         <term>w</term>
3367         <listitem>
3368          <para>Word. ICU: UBRK_WORD.</para>
3369         </listitem>
3370        </varlistentry>
3371
3372        <varlistentry>
3373         <term>c</term>
3374         <listitem>
3375          <para>Character. ICU: UBRK_CHARACTER.</para>
3376         </listitem>
3377        </varlistentry>
3378
3379        <varlistentry>
3380         <term>t</term>
3381         <listitem>
3382          <para>Title. ICU: UBRK_TITLE.</para>
3383         </listitem>
3384        </varlistentry>
3385
3386       </variablelist>
3387      </para></listitem>
3388    </varlistentry>
3389
3390    <varlistentry>
3391     <term>join</term>
3392     <listitem>
3393      <para>
3394       Joins tokens into one string. The rule attribute is the joining
3395       string, which may be empty. The join conversion element was added
3396       in YAZ 4.2.49.
3397      </para>
3398     </listitem>
3399    </varlistentry>
3400   </variablelist>
3401
3402  </para>
3403 </refsect1>
3404 <refsect1><title>EXAMPLES</title>
3405  <para>
3406   The following command analyzes text in file <filename moreinfo="none">text</filename>
3407   using ICU chain configuration <filename moreinfo="none">chain.xml</filename>:
3408   <screen format="linespecific">
3409    cat text | yaz-icu -c chain.xml
3410   </screen>
3411   The chain.xml might look as follows:
3412    <screen format="linespecific">
3413&lt;icu_chain locale="en"&gt;
3414  &lt;transform rule="[:Control:] Any-Remove"/&gt;
3415  &lt;tokenize rule="w"/&gt;
3416  &lt;transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/&gt;
3417  &lt;transliterate rule="xy &gt; z;"/&gt;
3418  &lt;display/&gt;
3419  &lt;casemap rule="l"/&gt;
3420&lt;/icu_chain&gt;
3421
3422   </screen>
3423  </para>
3424 </refsect1>
3425 <refsect1><title>SEE ALSO</title>
3426  <para>
3427   <citerefentry>
3428    <refentrytitle>yaz</refentrytitle>
3429    <manvolnum>7</manvolnum>
3430   </citerefentry>
3431  </para>
3432  <para>
3433   <ulink url="http://www.icu-project.org/">ICU Home</ulink>
3434  </para>
3435  <para>
3436   <ulink url="http://userguide.icu-project.org/transforms/general">ICU Transforms</ulink>
3437  </para>
3438 </refsect1>
3439</refentry>
3440<!--Generated by stripref.xsl . Do not edit-->
3441<refentry id="yaz-url">
3442 <refentryinfo>
3443  <productname class="trade">YAZ</productname>
3444  <productnumber>5.14.3</productnumber>
3445  <info><orgname>Index Data</orgname></info>
3446 </refentryinfo>
3447
3448 <refmeta>
3449  <refentrytitle>yaz-url</refentrytitle>
3450  <manvolnum>1</manvolnum>
3451  <refmiscinfo class="manual">Commands</refmiscinfo>
3452 </refmeta>
3453
3454 <refnamediv>
3455  <refname>yaz-url</refname>
3456  <refpurpose>YAZ URL fetch utility</refpurpose>
3457 </refnamediv>
3458
3459 <refsynopsisdiv>
3460  <cmdsynopsis sepchar=" ">
3461   <command moreinfo="none">yaz-url</command>
3462   <arg choice="opt" rep="norepeat">-H <replaceable>name:value</replaceable></arg>
3463   <arg choice="opt" rep="norepeat">-m <replaceable>method</replaceable></arg>
3464   <arg choice="opt" rep="norepeat">-O <replaceable>fname</replaceable></arg>
3465   <arg choice="opt" rep="norepeat">-p <replaceable>fname</replaceable></arg>
3466   <arg choice="opt" rep="norepeat">-R <replaceable>num</replaceable></arg>
3467   <arg choice="opt" rep="norepeat">-u <replaceable>user/password</replaceable></arg>
3468   <arg choice="opt" rep="norepeat">-v</arg>
3469   <arg choice="opt" rep="norepeat">-x <replaceable>proxy</replaceable></arg>
3470   <arg rep="repeat" choice="opt">url</arg>
3471  </cmdsynopsis>
3472 </refsynopsisdiv>
3473
3474 <refsect1><title>DESCRIPTION</title>
3475  <para>
3476   <command moreinfo="none">yaz-url</command> is utility to get web content. It is very
3477   limited in functionality compared to programs such as curl, wget.
3478  </para>
3479  <para>
3480   The options must be precede the URL given on the command line to take
3481   effect.
3482  </para>
3483  <para>
3484   Fetched HTTP content is written to stdout, unless option -O is given.
3485  </para>
3486 </refsect1>
3487
3488 <refsect1><title>OPTIONS</title>
3489  <variablelist>
3490   <varlistentry>
3491    <term>-H <replaceable>name:value</replaceable></term>
3492    <listitem><para>
3493      Specifies HTTP header content with name and value. This
3494      option can be given multiple times (for different names,
3495      of course).
3496     </para></listitem>
3497   </varlistentry>
3498
3499   <varlistentry>
3500    <term>-m <replaceable>method</replaceable></term>
3501    <listitem><para>
3502      Specifies the HTTP method to be used for the next URL.
3503      Default is method "GET". However, option -p sets it to "POST".
3504     </para></listitem>
3505   </varlistentry>
3506
3507   <varlistentry>
3508    <term>-O <replaceable>fname</replaceable></term>
3509    <listitem><para>
3510      Sets output filename for HTTP content.
3511     </para></listitem>
3512   </varlistentry>
3513
3514   <varlistentry>
3515    <term>-p <replaceable>fname</replaceable></term>
3516    <listitem><para>
3517      Sets a file to be POSTed in the folloing URL.
3518     </para></listitem>
3519   </varlistentry>
3520
3521   <varlistentry>
3522    <term>-R <replaceable>num</replaceable></term>
3523    <listitem><para>
3524      Sets maximum number of HTTP redirects to be followed.
3525      A value of zero disables follow of HTTP redirects.
3526     </para></listitem>
3527   </varlistentry>
3528
3529   <varlistentry>
3530    <term>-u <replaceable>user/password</replaceable></term>
3531    <listitem><para>
3532      Specifies a user and a password to be uesd in HTTP
3533      basic authentication in the following URL fetch. The user
3534      and password must be separated by a slash (this it is not
3535      possible to specify a user with a slash in it).
3536     </para></listitem>
3537   </varlistentry>
3538
3539   <varlistentry>
3540    <term>-v</term>
3541    <listitem><para>
3542      Makes yaz-url dump each HTTP request/response to stdout.
3543     </para></listitem>
3544   </varlistentry>
3545
3546   <varlistentry>
3547    <term>-x <replaceable>proxy</replaceable></term>
3548    <listitem><para>
3549      Specifies a proxy to be used for URL fetch.
3550     </para></listitem>
3551   </varlistentry>
3552
3553  </variablelist>
3554 </refsect1>
3555 <refsect1><title>SEE ALSO</title>
3556  <para>
3557   <citerefentry>
3558    <refentrytitle>yaz</refentrytitle>
3559    <manvolnum>7</manvolnum>
3560   </citerefentry>
3561  </para>
3562 </refsect1>
3563</refentry>
3564<!--Generated by stripref.xsl . Do not edit-->
3565<refentry id="bib1">
3566 <refentryinfo>
3567  <productname class="trade">YAZ</productname>
3568  <productnumber>5.14.3</productnumber>
3569  <info><orgname>Index Data</orgname></info>
3570 </refentryinfo>
3571
3572 <refmeta>
3573  <refentrytitle>Bib-1 Attribute Set</refentrytitle>
3574  <manvolnum>7</manvolnum>
3575  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
3576 </refmeta>
3577
3578 <refnamediv>
3579  <refname>bib1-attr</refname>
3580  <refpurpose>Bib-1 Attribute Set</refpurpose>
3581 </refnamediv>
3582
3583 <refsect1><title>DESCRIPTION</title>
3584  <para>
3585   This reference entry lists the Bib-1 attribute set types and values.
3586  </para>
3587 </refsect1>
3588
3589 <refsect1><title>TYPES</title>
3590  <para>
3591   The Bib-1 attribute defines six attribute types: Use (1), Relation (2),
3592   Position (3), Structure (4), Truncation (5) and completeness (6).
3593  </para>
3594 </refsect1>
3595
3596 <refsect1><title>USE (1)</title>
3597  <para>
3598   <screen format="linespecific">
3599    1     Personal-name
3600    2     Corporate-name
3601    3     Conference-name
3602    4     Title
3603    5     Title-series
3604    6     Title-uniform
3605    7     ISBN
3606    8     ISSN
3607    9     LC-card-number
3608    10    BNB-card-number
3609    11    BGF-number
3610    12    Local-number
3611    13    Dewey-classification
3612    14    UDC-classification
3613    15    Bliss-classification
3614    16    LC-call-number
3615    17    NLM-call-number
3616    18    NAL-call-number
3617    19    MOS-call-number
3618    20    Local-classification
3619    21    Subject-heading
3620    22    Subject-Rameau
3621    23    BDI-index-subject
3622    24    INSPEC-subject
3623    25    MESH-subject
3624    26    PA-subject
3625    27    LC-subject-heading
3626    28    RVM-subject-heading
3627    29    Local-subject-index
3628    30    Date
3629    31    Date-of-publication
3630    32    Date-of-acquisition
3631    33    Title-key
3632    34    Title-collective
3633    35    Title-parallel
3634    36    Title-cover
3635    37    Title-added-title-page
3636    38    Title-caption
3637    39    Title-running
3638    40    Title-spine
3639    41    Title-other-variant
3640    42    Title-former
3641    43    Title-abbreviated
3642    44    Title-expanded
3643    45    Subject-precis
3644    46    Subject-rswk
3645    47    Subject-subdivision
3646    48    Number-natl-biblio
3647    49    Number-legal-deposit
3648    50    Number-govt-pub
3649    51    Number-music-publisher
3650    52    Number-db
3651    53    Number-local-call
3652    54    Code-language
3653    55    Code-geographic
3654    56    Code-institution
3655    57    Name-and-title
3656    58    Name-geographic
3657    59    Place-publication
3658    60    CODEN
3659    61    Microform-generation
3660    62    Abstract
3661    63    Note
3662    1000  Author-title
3663    1001  Record-type
3664    1002  Name
3665    1003  Author
3666    1004  Author-name-personal
3667    1005  Author-name-corporate
3668    1006  Author-name-conference
3669    1007  Identifier-standard
3670    1008  Subject-LC-childrens
3671    1009  Subject-name-personal
3672    1010  Body-of-text
3673    1011  Date/time-added-to-db
3674    1012  Date/time-last-modified
3675    1013  Authority/format-id
3676    1014  Concept-text
3677    1015  Concept-reference
3678    1016  Any
3679    1017  Server-choice
3680    1018  Publisher
3681    1019  Record-source
3682    1020  Editor
3683    1021  Bib-level
3684    1022  Geographic-class
3685    1023  Indexed-by
3686    1024  Map-scale
3687    1025  Music-key
3688    1026  Related-periodical
3689    1027  Report-number
3690    1028  Stock-number
3691    1030  Thematic-number
3692    1031  Material-type
3693    1032  Doc-id
3694    1033  Host-item
3695    1034  Content-type
3696    1035  Anywhere
3697    1036  Author-Title-Subject
3698   </screen>
3699  </para>
3700 </refsect1>
3701
3702 <refsect1><title>RELATION (2)</title>
3703  <para>
3704   <screen format="linespecific">
3705    1 Less than
3706    2 Less than or equal
3707    3 Equal
3708    4 Greater or equal
3709    5 Greater than
3710    6 Not equal
3711    100 Phonetic
3712    101 Stem
3713    102 Relevance
3714    103 AlwaysMatches
3715   </screen>
3716  </para>
3717 </refsect1>
3718
3719 <refsect1><title>POSITION (3)</title>
3720  <para>
3721   <screen format="linespecific">
3722    1 First in field
3723    2 First in subfield
3724    3 Any position in field
3725   </screen>
3726  </para>
3727 </refsect1>
3728
3729 <refsect1><title>STRUCTURE (4)</title>
3730  <para>
3731   <screen format="linespecific">
3732    1 Phrase
3733    2 Word
3734    3 Key
3735    4 Year
3736    5 Date (normalized)
3737    6 Word list
3738    100 Date (un-normalized)
3739    101 Name (normalized)
3740    102 Name (un-normalized)
3741    103 Structure
3742    104 Urx
3743    105 Free-form-text
3744    106 Document-text
3745    107 Local-number
3746    108 String
3747    109 Numeric-string
3748   </screen>
3749  </para>
3750 </refsect1>
3751
3752 <refsect1><title>TRUNCATION (5)</title>
3753  <para>
3754   <screen format="linespecific">
3755    1 Right truncation
3756    2 Left truncation
3757    3 Left and right truncation
3758    100 Do not truncate
3759    101 Process # in search term  . regular #=.*
3760    102 RegExpr-1
3761    103 RegExpr-2
3762    104 Process # ?n . regular: #=., ?n=.{0,n} or ?=.* Z39.58
3763   </screen>
3764   </para>
3765  <para>
3766    Thw 105-106 truncation attributes below are only supported by
3767    Index Data's Zebra server.
3768    <screen format="linespecific">
3769    105 Process * ! regular: *=.*, !=. and right truncate
3770    106 Process * ! regular: *=.*, !=.
3771   </screen>
3772  </para>
3773 </refsect1>
3774
3775 <refsect1><title>COMPLETENSS (6)</title>
3776  <para>
3777   <screen format="linespecific">
3778    1 Incomplete subfield
3779    2 Complete subfield
3780    3 Complete field
3781   </screen>
3782  </para>
3783 </refsect1>
3784
3785 <refsect1><title>SORTING (7)</title>
3786  <para>
3787   <screen format="linespecific">
3788    1 ascending
3789    2 descending
3790   </screen>
3791  </para>
3792  <para>
3793    Type 7 is an Index Data extension to RPN queries that allows
3794    embedding a sort critieria into a query.
3795  </para>
3796 </refsect1>
3797
3798
3799 <refsect1><title>SEE ALSO</title>
3800  <para>
3801   <ulink url="http://www.loc.gov/z3950/agency/defns/bib1.html">Bib-1 Attribute Set</ulink>
3802  </para>
3803  <para>
3804   <ulink url="http://www.loc.gov/z3950/agency/bib1.html">Attibute
3805    Set Bib-1 Semantics</ulink>.
3806  </para>
3807 </refsect1>
3808</refentry>
3809<!--Generated by stripref.xsl . Do not edit-->
3810<refentry id="yaz-json-parse">
3811 <refentryinfo>
3812  <productname class="trade">YAZ</productname>
3813  <productnumber>5.14.3</productnumber>
3814  <info><orgname>Index Data</orgname></info>
3815 </refentryinfo>
3816
3817 <refmeta>
3818  <refentrytitle>yaz-json-parse</refentrytitle>
3819  <manvolnum>1</manvolnum>
3820  <refmiscinfo class="manual">Commands</refmiscinfo>
3821 </refmeta>
3822
3823 <refnamediv>
3824  <refname>yaz-json-parse</refname>
3825  <refpurpose>YAZ JSON parser</refpurpose>
3826 </refnamediv>
3827
3828 <refsynopsisdiv>
3829  <cmdsynopsis sepchar=" ">
3830   <command moreinfo="none">yaz-json-parse</command>
3831   <arg choice="opt" rep="norepeat">-p</arg>
3832  </cmdsynopsis>
3833 </refsynopsisdiv>
3834
3835 <refsect1><title>DESCRIPTION</title>
3836  <para>
3837   <command moreinfo="none">yaz-json-parse</command> is utility which demonstrates
3838   the JSON API of YAZ. (<filename moreinfo="none">yaz/json.h</filename>).
3839  </para>
3840  <para>
3841   The program attempts to parse a JSON from standard input (stdin).
3842   It will return exit code 1 if parsing fails and the parsing error message
3843   will be printed to standard error (stderr). The program returns exit code
3844   0 parsing succeeds and return no output, unless -p is given (see below).
3845  </para>
3846 </refsect1>
3847
3848 <refsect1><title>OPTIONS</title>
3849  <variablelist>
3850   <varlistentry>
3851    <term>-p</term>
3852    <listitem><para>
3853      Makes the JSON parser echo the JSON result string to standard output -
3854      if parsing from stdin was successful. If -p is given twice the
3855      output is a multi line output with indentation (pretty print).
3856     </para></listitem>
3857   </varlistentry>
3858
3859  </variablelist>
3860 </refsect1>
3861 <refsect1><title>SEE ALSO</title>
3862  <para>
3863   <citerefentry>
3864    <refentrytitle>yaz</refentrytitle>
3865    <manvolnum>7</manvolnum>
3866   </citerefentry>
3867  </para>
3868 </refsect1>
3869</refentry>
Note: See TracBrowser for help on using the repository browser.