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 for SRU. Other versions are allowed - for testing
194 purposes (version negotiation with SRU server).
195 The version is currently not used for SOLR Web Services
201 <literal>list_all</literal>
204 <para>This command displays status and values for many settings.
210 <literal>lslb</literal> <replaceable>n</replaceable>
213 <para>Sets the limit for when no records should be returned
214 together with the search result.
217 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
218 Z39.50 standard on set bounds
226 <literal>ssub</literal> <replaceable>n</replaceable>
229 <para>Sets the limit for when all records should be returned with
233 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
234 Z39.50 standard on set bounds
235 </ulink> for more details.
241 <literal>mspn</literal> <replaceable>n</replaceable>
244 <para>Sets the number of records should be returned if the
245 number of records in the result set is between the values of
246 <literal>lslb</literal> and <literal>ssub</literal>.
249 url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
250 Z39.50 standard on set bounds
257 <literal>status</literal>
260 <para>Displays the values of <literal>lslb</literal>,
261 <literal>ssub</literal> and <literal>mspn</literal>.
266 <literal>setname</literal>
269 <para>Switches named result sets on and off. Default is on.
274 <literal>cancel</literal>
277 <para>Sends a Trigger Resource Control Request to the target.
282 <literal>format</literal> <replaceable>oid</replaceable>
285 <para>Sets the preferred transfer syntax for retrieved records.
286 yaz-client supports all the record syntaxes that currently
289 url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
290 Z39.50 Record Syntax Identifiers
292 for more details. Commonly used records syntaxes include usmarc,
298 <literal>elements</literal> <replaceable>e</replaceable>
301 <para>Sets the element set name for the records. Many targets support
302 element sets are B (for brief) and F (for full).
307 <literal>close</literal>
310 <para>Sends a Z39.50 Close APDU and closes connection with the peer
314 <varlistentry id="command-querytype"><term>
315 <literal>querytype</literal> <replaceable>type</replaceable>
318 <para>Sets the query type as used by command
319 <link linkend="command-find"><literal>find</literal></link>.
320 The following is supported:
321 <literal>prefix</literal> for
322 <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
323 <literal>ccl</literal> for CCL search (Type-2 Query),
324 <literal>cql</literal> for CQL (Type-104 search with CQL OID),
325 <literal>ccl2rpn</literal> for
326 <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
327 <literal>cql2rpn</literal> for
328 CQL to RPN conversion (Type-1 Query).
333 <literal>attributeset</literal> <replaceable>set</replaceable>
337 Sets attribute set OID for prefix queries (RPN, Type-1).
342 <literal>refid</literal> <replaceable>id</replaceable>
345 <para>Sets reference ID for Z39.50 Request(s).
350 <literal>itemorder</literal>
351 <replaceable>type</replaceable> <replaceable>no</replaceable>
354 <para>Sends an Item Order Request using the ILL External.
355 <replaceable>type</replaceable> is either 1 or 2 which corresponds to
356 ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
357 is the Result Set position of the record to be ordered.
362 <literal>update</literal>
363 <replaceable>action</replaceable>
364 <replaceable>recid</replaceable>
365 <replaceable>doc</replaceable>
368 <para>Sends Item Update Request. The <replaceable>action</replaceable>
369 argument must be the action type: one of <literal>insert</literal>,
370 <literal>replace</literal>, <literal>delete</literal> and
371 <literal>update</literal>. The second argument,
372 <replaceable>recid</replaceable>, is the
373 record identifier (any string). Third argument which is optional is
374 the record document for the request. If doc is preceded with
375 "<", then the following characters are treated as a filename
376 with the records to be updated. Otherwise doc is treated as
377 a document itself. The doc may also be quited in double quotes.
378 If doc is omitted, the last received record (as part of present
379 response or piggybacked search response) is used for the update.
385 <literal>source</literal>
386 <replaceable>filename</replaceable>
389 <para>Executes list of commands from
390 file <replaceable>filename</replaceable>, just like source on
391 most UNIX shells. A single dot (<literal>.</literal>) can be used
399 <replaceable>args</replaceable>
402 <para>Executes command <replaceable>args</replaceable> in subshell
403 using the <literal>system</literal> call.
409 <literal>push_command</literal>
410 <replaceable>command</replaceable>
413 <para>The push_command takes another command as its argument.
414 That command is then added to the history information (so
415 you can retrieve it later). The command itself is not
416 executed. This command only works if you have GNU readline/history
423 <literal>set_apdufile</literal>
424 <replaceable>filename</replaceable>
427 <para>Sets that APDU should be logged to file
428 <replaceable>filename</replaceable>. Another way to achieve
429 APDU log is by using command-line option <literal>-a</literal>.
435 <literal>set_auto_reconnect</literal>
436 <replaceable>flag</replaceable>
439 <para>Specifies whether YAZ client automatically reconnect if
440 target closes connection (Z39.50 only).
443 <replaceable>flag</replaceable> must be either
444 <literal>on</literal> or <literal>off</literal>.
449 <varlistentry id="command-set-auto-wait"><term>
450 <literal>set_auto_wait</literal>
451 <replaceable>flag</replaceable>
454 <para>Specifies whether YAZ client should wait for
455 response protocol packages after a request.
456 By default YAZ client waits (on) for response packages immediately
457 after a command (find, show) has been issued. If <literal>off</literal>
458 is used, YAZ client does not attempt to receive packages automatically.
459 These will have to be manually received when command
460 <link linkend="command-wait-response">
461 <literal>wait_response</literal>
465 <replaceable>flag</replaceable> must be either
466 <literal>on</literal> or <literal>off</literal>.
472 <literal>set_marcdump</literal>
473 <replaceable>filename</replaceable>
476 <para>Specifies that all retrieved records should be appended to
477 file <replaceable>filename</replaceable>. This command does the
478 thing as option <literal>-m</literal>.
484 <literal>schema</literal>
485 <replaceable>schemaid</replaceable>
488 <para>Specifies schema for retrieval.
489 Schema may be specified as an OID for Z39.50.
490 For SRU, schema is a simple string URI.
495 <varlistentry id="command-charset"><term>
496 <literal>charset</literal>
497 <replaceable>negotiationcharset</replaceable>
498 [<replaceable>displaycharset</replaceable>]
499 [[<replaceable>marccharset</replaceable>]]
502 <para>Specifies character set (encoding) for Z39.50
503 negotiation / SRU encoding and/or character set for output (terminal).
506 <replaceable>negotiationcharset</replaceable> is the name
507 of the character set to be negotiated by the server. The special name
508 <literal>-</literal> for <replaceable>negotiationcharset</replaceable>
509 specifies <emphasis>no</emphasis> character set to be negotiated.
512 If <replaceable>displaycharset</replaceable> is given, it specifies name
513 of the character set of the output (on the terminal on which
514 YAZ client is running). To disable conversion of characters
515 to the output encoding, the special name <literal>-</literal> (dash)
517 If the special name <literal>auto</literal> is given, YAZ client will
518 convert strings to the encoding of the
519 terminal as returned by <function>nl_langinfo</function> call.
522 If <replaceable>marcharset</replaceable> is given, it specifies name
523 of the character set of retrieved MARC records from server. See
524 also <literal>marcharset</literal> command.
528 Since character set negotiation takes effect in the Z39.50
529 Initialize Request you should issue this command before
530 command <link linkend="command-open"><literal>open</literal></link>
536 MARC records are not covered by Z39.50 character set negotiation,
537 so that's why there is a separate character that must be known
538 in order to do meaningful conversion(s).
545 <literal>negcharset</literal>
546 <replaceable>charset</replaceable>
549 <para>Specifies character set for negotiation (Z39.50). The
550 argument is the same as second argument for command
551 <link linkend="command-charset"><literal>charset</literal></link>.
557 <literal>displaycharset</literal>
558 <replaceable>charset</replaceable>
561 <para>Specifies character set for output (display). The
562 argument is the same as second argument for command
563 <link linkend="command-charset"><literal>charset</literal></link>.
569 <literal>marccharset</literal>
570 <replaceable>charset</replaceable>
573 <para>Specifies character set for retrieved MARC records so
574 that YAZ client can display them in a character suitable
575 for your display. See <literal>charset</literal> command.
576 If <literal>auto</literal> is given, YAZ will assume
577 that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
578 for all other MARC variants. The charset argument is the
579 same as third argument for command
580 <link linkend="command-charset"><literal>charset</literal></link>.
586 <literal>querycharset</literal>
587 <replaceable>charset</replaceable>
590 <para>Specifies character set for query terms for Z39.50 RPN
591 queries and Z39.50 Scan Requests (termListAndStartPoint).
592 This is a pure client-side conversion which converts from
593 displayCharset to queryCharset.
599 <literal>set_cclfile</literal>
600 <replaceable>filename</replaceable>
603 <para>Specifies that CCL fields should be read from file
604 file <replaceable>filename</replaceable>. This command does the
605 thing as option <literal>-c</literal>.
611 <literal>set_cqlfile</literal>
612 <replaceable>filename</replaceable>
615 <para>Specifies that CQL fields should be read from file
616 file <replaceable>filename</replaceable>. This command does the
617 thing as option <literal>-q</literal>.
623 <literal>register_oid</literal>
624 <replaceable>name</replaceable>
625 <replaceable>class</replaceable>
626 <replaceable>OID</replaceable>
629 <para>This command allows you to register your own object
630 identifier - so that instead of entering a long dot-notation
631 you can use a short name instead.
632 The <replaceable>name</replaceable> is your
633 name for the OID, <replaceable>class</replaceable> is the
634 class, and <replaceable>OID</replaceable> is the raw OID in
635 dot notation. Class is one <literal>appctx</literal>,
636 <literal>absyn</literal>, <literal>attet</literal>,
637 <literal>transyn</literal>, <literal>diagset</literal>,
638 <literal>recsyn</literal>, <literal>resform</literal>,
639 <literal>accform</literal>, <literal>extserv</literal>,
640 <literal>userinfo</literal>, <literal>elemspec</literal>,
641 <literal>varset</literal>, <literal>schema</literal>,
642 <literal>tagset</literal>, <literal>general</literal>.
643 If you're in doubt use the <literal>general</literal>
650 <literal>register_tab</literal>
651 <replaceable>command</replaceable>
652 <replaceable>string</replaceable>
655 <para>This command registers a TAB completion string for
662 <literal>sleep</literal>
663 <replaceable>seconds</replaceable>
666 <para>This command makes YAZ client sleep (be idle) for
667 the number of seconds given.
672 <varlistentry id="command-wait-response"><term>
673 <literal>wait_response</literal>
674 [ <replaceable>number</replaceable>]
677 <para>This command makes YAZ client wait for a number of
678 response packages from target. If <replaceable>number</replaceable> is
679 omitted, 1 is assumed.
681 <para>This command is rarely used and is only useful if command
682 <link linkend="command-set-auto-wait">
683 <literal>set_auto_wait</literal>
684 </link> is set to off.
689 <varlistentry id="command-xmles"><term>
690 <literal>xmles</literal>
691 <replaceable>OID</replaceable>
692 <replaceable>doc</replaceable>
695 <para>Sends XML Extended Services request using the OID and doc given.
701 <literal>zversion</literal>
702 <replaceable>ver</replaceable>
705 <para>This command sets Z39.50 version for negotiation.
706 Should be used before
707 <link linkend="command-open"><literal>open</literal></link>.
708 By default 3 (version 3) is used.
714 <literal>options</literal>
715 <replaceable>op1 op2..</replaceable>
718 <para>This command sets Z39.50 options for negotiation.
719 Should be used before
720 <link linkend="command-open"><literal>open</literal></link>.
723 The following options are supported:
724 <literal>search</literal>,
725 <literal>present</literal>,
726 <literal>delSet</literal>,
727 <literal>resourceReport</literal>,
728 <literal>triggerResourceCtrl</literal>,
729 <literal>resourceCtrl</literal>,
730 <literal>accessCtrl</literal>,
731 <literal>scan</literal>,
732 <literal>sort</literal>,
733 <literal>extendedServices</literal>,
734 <literal>level_1Segmentation</literal>,
735 <literal>level_2Segmentation</literal>,
736 <literal>concurrentOperations</literal>,
737 <literal>namedResultSets</literal>,
738 <literal>encapsulation</literal>,
739 <literal>resultCount</literal>,
740 <literal>negotiationModel</literal>,
741 <literal>duplicationDetection</literal>,
742 <literal>queryType104</literal>,
743 <literal>pQESCorrection</literal>,
744 <literal>stringSchema</literal>.
750 <!-- Keep this comment at the end of the file
755 sgml-minimize-attributes:nil
756 sgml-always-quote-attributes:t
759 sgml-parent-document: "yaz.xml"
760 sgml-local-catalogs: nil
761 sgml-namecase-general:t