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 SRU method and version.
190 Must be one of <literal>POST</literal>,
191 <literal>GET</literal>, <literal>SOAP</literal> (default). Version
192 should be either 1.1 or 1.2. Other versions are allowed - for testing
193 purposes (version negotiation with SRU server).
199 <literal>list_all</literal>
202 <para>This command displays status and values for many settings.
208 <literal>lslb</literal> <replaceable>n</replaceable>
211 <para>Sets the limit for when no records should be returned
212 together with the search result.
215 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
224 <literal>ssub</literal> <replaceable>n</replaceable>
227 <para>Sets the limit for when all records should be returned with
231 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
233 </ulink> for more details.
239 <literal>mspn</literal> <replaceable>n</replaceable>
242 <para>Sets the number of records should be returned if the
243 number of records in the result set is between the values of
244 <literal>lslb</literal> and <literal>ssub</literal>.
247 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
255 <literal>status</literal>
258 <para>Displays the values of <literal>lslb</literal>,
259 <literal>ssub</literal> and <literal>mspn</literal>.
264 <literal>setname</literal>
267 <para>Switches named result sets on and off. Default is on.
272 <literal>cancel</literal>
275 <para>Sends a Trigger Resource Control Request to the target.
280 <literal>format</literal> <replaceable>oid</replaceable>
283 <para>Sets the preferred transfer syntax for retrieved records.
284 yaz-client supports all the record syntaxes that currently
287 url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
290 for more details. Commonly used records syntaxes include usmarc,
296 <literal>elements</literal> <replaceable>e</replaceable>
299 <para>Sets the element set name for the records. Many targets support
300 element sets are B (for brief) and F (for full).
305 <literal>close</literal>
308 <para>Sends a Z39.50 Close APDU and closes connection with the peer
312 <varlistentry id="command-querytype"><term>
313 <literal>querytype</literal> <replaceable>type</replaceable>
316 <para>Sets the query type as used by command
317 <link linkend="command-find"><literal>find</literal></link>.
318 The following is supported:
319 <literal>prefix</literal> for
320 <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
321 <literal>ccl</literal> for CCL search (Type-2 Query),
322 <literal>cql</literal> for CQL (Type-104 search with CQL OID),
323 <literal>ccl2rpn</literal> for
324 <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
325 <literal>cql2rpn</literal> for
326 CQL to RPN conversion (Type-1 Query).
331 <literal>attributeset</literal> <replaceable>set</replaceable>
335 Sets attribute set OID for prefix queries (RPN, Type-1).
340 <literal>refid</literal> <replaceable>id</replaceable>
343 <para>Sets reference ID for Z39.50 Request(s).
348 <literal>itemorder</literal>
349 <replaceable>type</replaceable> <replaceable>no</replaceable>
352 <para>Sends an Item Order Request using the ILL External.
353 <replaceable>type</replaceable> is either 1 or 2 which corresponds to
354 ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
355 is the Result Set position of the record to be ordered.
360 <literal>update</literal>
361 <replaceable>action</replaceable>
362 <replaceable>recid</replaceable>
363 <replaceable>doc</replaceable>
366 <para>Sends Item Update Request. The <replaceable>action</replaceable>
367 argument must be the action type: one of <literal>insert</literal>,
368 <literal>replace</literal>, <literal>delete</literal> and
369 <literal>update</literal>. The second argument,
370 <replaceable>recid</replaceable>, is the
371 record identifier (any string). Third argument which is optional is
372 the record document for the request. If doc is preceded with
373 "<", then the following characters are treated as a filename
374 with the records to be updated. Otherwise doc is treated as
375 a document itself. The doc may also be quited in double quotes.
376 If doc is omitted, the last received record (as part of present
377 response or piggybacked search response) is used for the update.
383 <literal>source</literal>
384 <replaceable>filename</replaceable>
387 <para>Executes list of commands from
388 file <replaceable>filename</replaceable>, just like source on
389 most UNIX shells. A single dot (<literal>.</literal>) can be used
397 <replaceable>args</replaceable>
400 <para>Executes command <replaceable>args</replaceable> in subshell
401 using the <literal>system</literal> call.
407 <literal>push_command</literal>
408 <replaceable>command</replaceable>
411 <para>The push_command takes another command as its argument.
412 That command is then added to the history information (so
413 you can retrieve it later). The command itself is not
414 executed. This command only works if you have GNU readline/history
421 <literal>set_apdufile</literal>
422 <replaceable>filename</replaceable>
425 <para>Sets that APDU should be logged to file
426 <replaceable>filename</replaceable>. Another way to achieve
427 APDU log is by using command-line option <literal>-a</literal>.
433 <literal>set_auto_reconnect</literal>
434 <replaceable>flag</replaceable>
437 <para>Specifies whether YAZ client automatically reconnect if
438 target closes connection (Z39.50 only).
441 <replaceable>flag</replaceable> must be either
442 <literal>on</literal> or <literal>off</literal>.
447 <varlistentry id="command-set-auto-wait"><term>
448 <literal>set_auto_wait</literal>
449 <replaceable>flag</replaceable>
452 <para>Specifies whether YAZ client should wait for
453 response protocol packages after a request.
454 By default YAZ client waits (on) for response packages immediately
455 after a command (find, show) has been issued. If <literal>off</literal>
456 is used, YAZ client does not attempt to receive packages automatically.
457 These will have to be manually received when command
458 <link linkend="command-wait-response">
459 <literal>wait_response</literal>
463 <replaceable>flag</replaceable> must be either
464 <literal>on</literal> or <literal>off</literal>.
470 <literal>set_marcdump</literal>
471 <replaceable>filename</replaceable>
474 <para>Specifies that all retrieved records should be appended to
475 file <replaceable>filename</replaceable>. This command does the
476 thing as option <literal>-m</literal>.
482 <literal>schema</literal>
483 <replaceable>schemaid</replaceable>
486 <para>Specifies schema for retrieval.
487 Schema may be specified as an OID for Z39.50.
488 For SRU, schema is a simple string URI.
493 <varlistentry id="command-charset"><term>
494 <literal>charset</literal>
495 <replaceable>negotiationcharset</replaceable>
496 [<replaceable>displaycharset</replaceable>]
497 [[<replaceable>marccharset</replaceable>]]
500 <para>Specifies character set (encoding) for Z39.50
501 negotiation / SRU encoding and/or character set for output (terminal).
504 <replaceable>negotiationcharset</replaceable> is the name
505 of the character set to be negotiated by the server. The special name
506 <literal>-</literal> for <replaceable>negotiationcharset</replaceable>
507 specifies <emphasis>no</emphasis> character set to be negotiated.
510 If <replaceable>displaycharset</replaceable> is given, it specifies name
511 of the character set of the output (on the terminal on which
512 YAZ client is running). To disable conversion of characters
513 to the output encoding, the special name <literal>-</literal> (dash)
515 If the special name <literal>auto</literal> is given, YAZ client will
516 convert strings to the encoding of the
517 terminal as returned by <function>nl_langinfo</function> call.
520 If <replaceable>marcharset</replaceable> is given, it specifies name
521 of the character set of retrieved MARC records from server. See
522 also <literal>marcharset</literal> command.
526 Since character set negotation takes effect in the Z39.50
527 Initialize Request you should issue this command before
528 command <link linkend="command-open"><literal>open</literal></link>
534 MARC records are not covered by Z39.50 character set negotiation,
535 so that's why there is a separate character that must be known
536 in order to do meaningful conversion(s).
543 <literal>negcharset</literal>
544 <replaceable>charset</replaceable>
547 <para>Specifies character set for negotiation (Z39.50). The
548 argument is the same as second argument for command
549 <link linkend="command-charset"><literal>charset</literal></link>.
555 <literal>displaycharset</literal>
556 <replaceable>charset</replaceable>
559 <para>Specifies character set for output (display). The
560 argument is the same as second argument for command
561 <link linkend="command-charset"><literal>charset</literal></link>.
567 <literal>marccharset</literal>
568 <replaceable>charset</replaceable>
571 <para>Specifies character set for retrieved MARC records so
572 that YAZ client can display them in a character suitable
573 for your display. See <literal>charset</literal> command.
574 If <literal>auto</literal> is given, YAZ will assume
575 that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
576 for all other MARC variants. The charset argument is the
577 same as third argument for command
578 <link linkend="command-charset"><literal>charset</literal></link>.
584 <literal>querycharset</literal>
585 <replaceable>charset</replaceable>
588 <para>Specifies character set for query terms for Z39.50 RPN
589 queries and Z39.50 Scan Requests (termListAndStartPoint).
590 This is a pure client-side conversion which converts from
591 displayCharset to queryCharset.
597 <literal>set_cclfile</literal>
598 <replaceable>filename</replaceable>
601 <para>Specifies that CCL fields should be read from file
602 file <replaceable>filename</replaceable>. This command does the
603 thing as option <literal>-c</literal>.
609 <literal>set_cqlfile</literal>
610 <replaceable>filename</replaceable>
613 <para>Specifies that CQL fields should be read from file
614 file <replaceable>filename</replaceable>. This command does the
615 thing as option <literal>-q</literal>.
621 <literal>register_oid</literal>
622 <replaceable>name</replaceable>
623 <replaceable>class</replaceable>
624 <replaceable>OID</replaceable>
627 <para>This command allows you to register your own object
628 identifier - so that instead of entering a long dot-notation
629 you can use a short name instead.
630 The <replaceable>name</replaceable> is your
631 name for the OID, <replaceable>class</replaceable> is the
632 class, and <replaceable>OID</replaceable> is the raw OID in
633 dot notation. Class is one <literal>appctx</literal>,
634 <literal>absyn</literal>, <literal>attet</literal>,
635 <literal>transyn</literal>, <literal>diagset</literal>,
636 <literal>recsyn</literal>, <literal>resform</literal>,
637 <literal>accform</literal>, <literal>extserv</literal>,
638 <literal>userinfo</literal>, <literal>elemspec</literal>,
639 <literal>varset</literal>, <literal>schema</literal>,
640 <literal>tagset</literal>, <literal>general</literal>.
641 If you're in doubt use the <literal>general</literal>
648 <literal>register_tab</literal>
649 <replaceable>command</replaceable>
650 <replaceable>string</replaceable>
653 <para>This command registers a TAB completion string for
660 <literal>sleep</literal>
661 <replaceable>seconds</replaceable>
664 <para>This command makes YAZ client sleep (be idle) for
665 the number of seconds given.
670 <varlistentry id="command-wait-response"><term>
671 <literal>wait_response</literal>
672 [ <replaceable>number</replaceable>]
675 <para>This command makes YAZ client wait for a number of
676 response packages from target. If <replaceable>number</replaceable> is
677 omitted, 1 is assumed.
679 <para>This command is rarely used and is only useful if command
680 <link linkend="command-set-auto-wait">
681 <literal>set_auto_wait</literal>
682 </link> is set to off.
687 <varlistentry id="command-xmles"><term>
688 <literal>xmles</literal>
689 <replaceable>OID</replaceable>
690 <replaceable>doc</replaceable>
693 <para>Sends XML Extended Services request using the OID and doc given.
699 <literal>zversion</literal>
700 <replaceable>ver</replaceable>
703 <para>This command sets Z39.50 version for negotiation.
704 Should be used before
705 <link linkend="command-open"><literal>open</literal></link>.
706 By default 3 (version 3) is used.
712 <literal>options</literal>
713 <replaceable>op1 op2..</replaceable>
716 <para>This command sets Z39.50 options for negotiation.
717 Should be used before
718 <link linkend="command-open"><literal>open</literal></link>.
721 The following options are supported:
722 <literal>search</literal>,
723 <literal>present</literal>,
724 <literal>delSet</literal>,
725 <literal>resourceReport</literal>,
726 <literal>triggerResourceCtrl</literal>,
727 <literal>resourceCtrl</literal>,
728 <literal>accessCtrl</literal>,
729 <literal>scan</literal>,
730 <literal>sort</literal>,
731 <literal>extendedServices</literal>,
732 <literal>level_1Segmentation</literal>,
733 <literal>level_2Segmentation</literal>,
734 <literal>concurrentOperations</literal>,
735 <literal>namedResultSets</literal>,
736 <literal>encapsulation</literal>,
737 <literal>resultCount</literal>,
738 <literal>negotiationModel</literal>,
739 <literal>duplicationDetection</literal>,
740 <literal>queryType104</literal>,
741 <literal>pQESCorrection</literal>,
742 <literal>stringSchema</literal>.
748 <!-- Keep this comment at the end of the file
753 sgml-minimize-attributes:nil
754 sgml-always-quote-attributes:t
757 sgml-parent-document: "yaz.xml"
758 sgml-local-catalogs: nil
759 sgml-namecase-general:t