2 Commands for YAZ client.
3 Included in both manual and man page for yaz-client.
6 <varlistentry id="command-open"><term>
7 <literal>open </literal><replaceable>zurl</replaceable>
10 <para>Opens a connection to a server. The syntax for
11 <replaceable>zurl</replaceable> is the same as described
12 above for connecting from the command line.
18 [<literal>(tcp|ssl|unix|http)':'</literal>]<replaceable>host</replaceable>
19 [:<replaceable>port</replaceable>][/<replaceable>base</replaceable>]
24 <literal>quit</literal>
27 <para>Quits YAZ client</para>
30 <varlistentry id="command-find"><term>
31 <literal>find </literal><replaceable>query</replaceable></term>
33 <para>Sends a Search Request using the <replaceable>query</replaceable>
34 given. By default the query is assumed to be PQF. See command
35 <link linkend="command-querytype">querytype</link> for more information.
40 <literal>delete</literal> <replaceable>setname</replaceable></term>
42 <para>Deletes result set with name <replaceable>setname</replaceable>
47 <literal>base </literal><replaceable>base1</replaceable>
48 <replaceable>base2</replaceable> ...
51 <para>Sets the name(s) of the database(s) to search. One or more
52 databases may be specified separated by blanks. This commands overrides
53 the database given in <replaceable>zurl</replaceable>.
58 <literal>show </literal>
59 [<replaceable>start</replaceable>[+<replaceable>number</replaceable>]]
62 <para>Fetches records by sending a Present Request from the start
64 <replaceable>start</replaceable>
65 a number of records given by <replaceable>number</replaceable>. If
66 <replaceable>start</replaceable> is not given, then the client
67 will fetch from position of the last retrieved record plus 1. If
68 <replaceable>number</replaceable> is not given, then one record will
74 <literal>scan</literal> <replaceable>term</replaceable>
78 database index for a term. The syntax resembles the syntax
79 for <link linkend="command-find"><literal>find</literal></link>.
80 If you want to scan for the word <literal>water</literal> you could
87 but if you want to scan only in, say the title field, you would write
95 <literal>setscan</literal> <replaceable>set</replaceable> <replaceable>term</replaceable>
98 <simpara>Scans database index for a term within a result set. This
99 is similar to the scan command but has a result set as its first argument.
104 <literal>scanpos</literal> <replaceable>pos</replaceable>
108 Sets preferred position for scan. This value
109 is used in next scan. By default position is 1.
114 <literal>scansize</literal> <replaceable>size</replaceable>
118 Sets number of entries to be returned by scan. Default
119 number of entries is 20.
124 <literal>scanstep</literal> <replaceable>step</replaceable>
128 Set step-size for scan. This value is used in next scan
129 sent to the target. By default step-size is 0.
133 <varlistentry id="sortspec"><term>
134 <literal>sort</literal> <replaceable>sortspecs</replaceable>
137 <para>Sorts a result set. The sort command takes a
138 sequence of space-separated sort specifications, with each sort
139 specification consisting of two space-separated words (so that the
140 whole specification list is made up of an even number of words).
141 The first word of each specification
142 holds a field (sort criterion) and the second holds flags.
143 If the sort criterion includes <literal>=</literal> it is assumed
144 that the <literal>SortKey</literal> is of type
145 <literal>sortAttributes</literal> using Bib-1: in this case
146 the integer before <literal>=</literal> is
147 the attribute type and the integer following <literal>=</literal>
148 is the attribute value.
149 If no <literal>=</literal> is in the criterion it is treated as a
150 sortfield of type InternationalString.
151 The flags word of each sort specification must consist of
153 for case sensitive or <literal>i</literal> for case insensitive, and
154 <literal><</literal> for ascending order or <literal>></literal>
155 for descending order.
160 <literal>sort+</literal>
163 <para>Same as <literal>sort</literal> but stores the sorted
164 result set in a new result set.
169 <literal>authentication</literal> <replaceable>openauth</replaceable>
172 <para>Sets up a authentication string if a server requires
173 authentication (v2 OpenStyle). The authentication string is first
174 sent to the server when the
175 <link linkend="command-open"><literal>open</literal></link> command is
176 issued and the Z39.50 Initialize Request is sent, so this command
177 must be used before <literal>open</literal> in order to be effective.
178 A common convention for the <replaceable>authopen</replaceable> string
179 is that the username - and password is separated by a slash, e.g.
180 <literal>myusername/mysecret</literal>.
186 <literal>sru</literal> <replaceable>method</replaceable> <replaceable>version</replaceable>
189 <para>Selects Web Service method and version.
190 Must be one of <literal>POST</literal>,
191 <literal>GET</literal>, <literal>SOAP</literal> (default)
192 or <literal>SOLR</literal>. Version
193 should be either 1.1 or 1.2. Other versions are allowed - for testing
194 purposes (version negotiation with SRU server).
200 <literal>list_all</literal>
203 <para>This command displays status and values for many settings.
209 <literal>lslb</literal> <replaceable>n</replaceable>
212 <para>Sets the limit for when no records should be returned
213 together with the search result.
216 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
217 Z39.50 standard on set bounds
225 <literal>ssub</literal> <replaceable>n</replaceable>
228 <para>Sets the limit for when all records should be returned with
232 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
233 Z39.50 standard on set bounds
234 </ulink> for more details.
240 <literal>mspn</literal> <replaceable>n</replaceable>
243 <para>Sets the number of records should be returned if the
244 number of records in the result set is between the values of
245 <literal>lslb</literal> and <literal>ssub</literal>.
248 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
249 Z39.50 standard on set bounds
256 <literal>status</literal>
259 <para>Displays the values of <literal>lslb</literal>,
260 <literal>ssub</literal> and <literal>mspn</literal>.
265 <literal>setname</literal>
268 <para>Switches named result sets on and off. Default is on.
273 <literal>cancel</literal>
276 <para>Sends a Trigger Resource Control Request to the target.
281 <literal>format</literal> <replaceable>oid</replaceable>
284 <para>Sets the preferred transfer syntax for retrieved records.
285 yaz-client supports all the record syntaxes that currently
288 url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
289 Z39.50 Record Syntax Identifiers
291 for more details. Commonly used records syntaxes include usmarc,
297 <literal>elements</literal> <replaceable>e</replaceable>
300 <para>Sets the element set name for the records. Many targets support
301 element sets are B (for brief) and F (for full).
306 <literal>close</literal>
309 <para>Sends a Z39.50 Close APDU and closes connection with the peer
313 <varlistentry id="command-querytype"><term>
314 <literal>querytype</literal> <replaceable>type</replaceable>
317 <para>Sets the query type as used by command
318 <link linkend="command-find"><literal>find</literal></link>.
319 The following is supported:
320 <literal>prefix</literal> for
321 <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
322 <literal>ccl</literal> for CCL search (Type-2 Query),
323 <literal>cql</literal> for CQL (Type-104 search with CQL OID),
324 <literal>ccl2rpn</literal> for
325 <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
326 <literal>cql2rpn</literal> for
327 CQL to RPN conversion (Type-1 Query).
332 <literal>attributeset</literal> <replaceable>set</replaceable>
336 Sets attribute set OID for prefix queries (RPN, Type-1).
341 <literal>refid</literal> <replaceable>id</replaceable>
344 <para>Sets reference ID for Z39.50 Request(s).
349 <literal>itemorder</literal>
350 <replaceable>type</replaceable> <replaceable>no</replaceable>
353 <para>Sends an Item Order Request using the ILL External.
354 <replaceable>type</replaceable> is either 1 or 2 which corresponds to
355 ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
356 is the Result Set position of the record to be ordered.
361 <literal>update</literal>
362 <replaceable>action</replaceable>
363 <replaceable>recid</replaceable>
364 <replaceable>doc</replaceable>
367 <para>Sends Item Update Request. The <replaceable>action</replaceable>
368 argument must be the action type: one of <literal>insert</literal>,
369 <literal>replace</literal>, <literal>delete</literal> and
370 <literal>update</literal>. The second argument,
371 <replaceable>recid</replaceable>, is the
372 record identifier (any string). Third argument which is optional is
373 the record document for the request. If doc is preceded with
374 "<", then the following characters are treated as a filename
375 with the records to be updated. Otherwise doc is treated as
376 a document itself. The doc may also be quited in double quotes.
377 If doc is omitted, the last received record (as part of present
378 response or piggybacked search response) is used for the update.
384 <literal>source</literal>
385 <replaceable>filename</replaceable>
388 <para>Executes list of commands from
389 file <replaceable>filename</replaceable>, just like source on
390 most UNIX shells. A single dot (<literal>.</literal>) can be used
398 <replaceable>args</replaceable>
401 <para>Executes command <replaceable>args</replaceable> in subshell
402 using the <literal>system</literal> call.
408 <literal>push_command</literal>
409 <replaceable>command</replaceable>
412 <para>The push_command takes another command as its argument.
413 That command is then added to the history information (so
414 you can retrieve it later). The command itself is not
415 executed. This command only works if you have GNU readline/history
422 <literal>set_apdufile</literal>
423 <replaceable>filename</replaceable>
426 <para>Sets that APDU should be logged to file
427 <replaceable>filename</replaceable>. Another way to achieve
428 APDU log is by using command-line option <literal>-a</literal>.
434 <literal>set_auto_reconnect</literal>
435 <replaceable>flag</replaceable>
438 <para>Specifies whether YAZ client automatically reconnect if
439 target closes connection (Z39.50 only).
442 <replaceable>flag</replaceable> must be either
443 <literal>on</literal> or <literal>off</literal>.
448 <varlistentry id="command-set-auto-wait"><term>
449 <literal>set_auto_wait</literal>
450 <replaceable>flag</replaceable>
453 <para>Specifies whether YAZ client should wait for
454 response protocol packages after a request.
455 By default YAZ client waits (on) for response packages immediately
456 after a command (find, show) has been issued. If <literal>off</literal>
457 is used, YAZ client does not attempt to receive packages automatically.
458 These will have to be manually received when command
459 <link linkend="command-wait-response">
460 <literal>wait_response</literal>
464 <replaceable>flag</replaceable> must be either
465 <literal>on</literal> or <literal>off</literal>.
471 <literal>set_marcdump</literal>
472 <replaceable>filename</replaceable>
475 <para>Specifies that all retrieved records should be appended to
476 file <replaceable>filename</replaceable>. This command does the
477 thing as option <literal>-m</literal>.
483 <literal>schema</literal>
484 <replaceable>schemaid</replaceable>
487 <para>Specifies schema for retrieval.
488 Schema may be specified as an OID for Z39.50.
489 For SRU, schema is a simple string URI.
494 <varlistentry id="command-charset"><term>
495 <literal>charset</literal>
496 <replaceable>negotiationcharset</replaceable>
497 [<replaceable>displaycharset</replaceable>]
498 [[<replaceable>marccharset</replaceable>]]
501 <para>Specifies character set (encoding) for Z39.50
502 negotiation / SRU encoding and/or character set for output (terminal).
505 <replaceable>negotiationcharset</replaceable> is the name
506 of the character set to be negotiated by the server. The special name
507 <literal>-</literal> for <replaceable>negotiationcharset</replaceable>
508 specifies <emphasis>no</emphasis> character set to be negotiated.
511 If <replaceable>displaycharset</replaceable> is given, it specifies name
512 of the character set of the output (on the terminal on which
513 YAZ client is running). To disable conversion of characters
514 to the output encoding, the special name <literal>-</literal> (dash)
516 If the special name <literal>auto</literal> is given, YAZ client will
517 convert strings to the encoding of the
518 terminal as returned by <function>nl_langinfo</function> call.
521 If <replaceable>marcharset</replaceable> is given, it specifies name
522 of the character set of retrieved MARC records from server. See
523 also <literal>marcharset</literal> command.
527 Since character set negotation takes effect in the Z39.50
528 Initialize Request you should issue this command before
529 command <link linkend="command-open"><literal>open</literal></link>
535 MARC records are not covered by Z39.50 character set negotiation,
536 so that's why there is a separate character that must be known
537 in order to do meaningful conversion(s).
544 <literal>negcharset</literal>
545 <replaceable>charset</replaceable>
548 <para>Specifies character set for negotiation (Z39.50). The
549 argument is the same as second argument for command
550 <link linkend="command-charset"><literal>charset</literal></link>.
556 <literal>displaycharset</literal>
557 <replaceable>charset</replaceable>
560 <para>Specifies character set for output (display). The
561 argument is the same as second argument for command
562 <link linkend="command-charset"><literal>charset</literal></link>.
568 <literal>marccharset</literal>
569 <replaceable>charset</replaceable>
572 <para>Specifies character set for retrieved MARC records so
573 that YAZ client can display them in a character suitable
574 for your display. See <literal>charset</literal> command.
575 If <literal>auto</literal> is given, YAZ will assume
576 that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
577 for all other MARC variants. The charset argument is the
578 same as third argument for command
579 <link linkend="command-charset"><literal>charset</literal></link>.
585 <literal>querycharset</literal>
586 <replaceable>charset</replaceable>
589 <para>Specifies character set for query terms for Z39.50 RPN
590 queries and Z39.50 Scan Requests (termListAndStartPoint).
591 This is a pure client-side conversion which converts from
592 displayCharset to queryCharset.
598 <literal>set_cclfile</literal>
599 <replaceable>filename</replaceable>
602 <para>Specifies that CCL fields should be read from file
603 file <replaceable>filename</replaceable>. This command does the
604 thing as option <literal>-c</literal>.
610 <literal>set_cqlfile</literal>
611 <replaceable>filename</replaceable>
614 <para>Specifies that CQL fields should be read from file
615 file <replaceable>filename</replaceable>. This command does the
616 thing as option <literal>-q</literal>.
622 <literal>register_oid</literal>
623 <replaceable>name</replaceable>
624 <replaceable>class</replaceable>
625 <replaceable>OID</replaceable>
628 <para>This command allows you to register your own object
629 identifier - so that instead of entering a long dot-notation
630 you can use a short name instead.
631 The <replaceable>name</replaceable> is your
632 name for the OID, <replaceable>class</replaceable> is the
633 class, and <replaceable>OID</replaceable> is the raw OID in
634 dot notation. Class is one <literal>appctx</literal>,
635 <literal>absyn</literal>, <literal>attet</literal>,
636 <literal>transyn</literal>, <literal>diagset</literal>,
637 <literal>recsyn</literal>, <literal>resform</literal>,
638 <literal>accform</literal>, <literal>extserv</literal>,
639 <literal>userinfo</literal>, <literal>elemspec</literal>,
640 <literal>varset</literal>, <literal>schema</literal>,
641 <literal>tagset</literal>, <literal>general</literal>.
642 If you're in doubt use the <literal>general</literal>
649 <literal>register_tab</literal>
650 <replaceable>command</replaceable>
651 <replaceable>string</replaceable>
654 <para>This command registers a TAB completion string for
661 <literal>sleep</literal>
662 <replaceable>seconds</replaceable>
665 <para>This command makes YAZ client sleep (be idle) for
666 the number of seconds given.
671 <varlistentry id="command-wait-response"><term>
672 <literal>wait_response</literal>
673 [ <replaceable>number</replaceable>]
676 <para>This command makes YAZ client wait for a number of
677 response packages from target. If <replaceable>number</replaceable> is
678 omitted, 1 is assumed.
680 <para>This command is rarely used and is only useful if command
681 <link linkend="command-set-auto-wait">
682 <literal>set_auto_wait</literal>
683 </link> is set to off.
688 <varlistentry id="command-xmles"><term>
689 <literal>xmles</literal>
690 <replaceable>OID</replaceable>
691 <replaceable>doc</replaceable>
694 <para>Sends XML Extended Services request using the OID and doc given.
700 <literal>zversion</literal>
701 <replaceable>ver</replaceable>
704 <para>This command sets Z39.50 version for negotiation.
705 Should be used before
706 <link linkend="command-open"><literal>open</literal></link>.
707 By default 3 (version 3) is used.
713 <literal>options</literal>
714 <replaceable>op1 op2..</replaceable>
717 <para>This command sets Z39.50 options for negotiation.
718 Should be used before
719 <link linkend="command-open"><literal>open</literal></link>.
722 The following options are supported:
723 <literal>search</literal>,
724 <literal>present</literal>,
725 <literal>delSet</literal>,
726 <literal>resourceReport</literal>,
727 <literal>triggerResourceCtrl</literal>,
728 <literal>resourceCtrl</literal>,
729 <literal>accessCtrl</literal>,
730 <literal>scan</literal>,
731 <literal>sort</literal>,
732 <literal>extendedServices</literal>,
733 <literal>level_1Segmentation</literal>,
734 <literal>level_2Segmentation</literal>,
735 <literal>concurrentOperations</literal>,
736 <literal>namedResultSets</literal>,
737 <literal>encapsulation</literal>,
738 <literal>resultCount</literal>,
739 <literal>negotiationModel</literal>,
740 <literal>duplicationDetection</literal>,
741 <literal>queryType104</literal>,
742 <literal>pQESCorrection</literal>,
743 <literal>stringSchema</literal>.
749 <!-- Keep this comment at the end of the file
754 sgml-minimize-attributes:nil
755 sgml-always-quote-attributes:t
758 sgml-parent-document: "yaz.xml"
759 sgml-local-catalogs: nil
760 sgml-namecase-general:t