2 $Id: yaz-client-commands.xml,v 1.7 2005-02-02 17:11:05 adam Exp $
3 Commands for YAZ client.
4 Included in both manual and man page for yaz-client.
8 <literal>open </literal><replaceable>zurl</replaceable>
11 <para>Opens a connection to a server. The syntax for
12 <replaceable>zurl</replaceable> is the same as described
13 above for connecting from the command line.
19 [<literal>(tcp|ssl|unix|http)':'</literal>]<replaceable>host</replaceable>
20 [:<replaceable>port</replaceable>][/<replaceable>base</replaceable>]
25 <literal>quit</literal>
28 <para>Quits YAZ client</para>
32 <literal>f </literal><replaceable>query</replaceable></term>
34 <para>Sends a Search Request using the <replaceable>query</replaceable>
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 <literal>find</literal>.
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>scanpos</literal> <replaceable>pos</replaceable>
99 Sets preferred position for scan. This value
100 is used in next scan. By default position is 1.
105 <literal>scansize</literal> <replaceable>size</replaceable>
109 Sets number of entries to be returned by scan. Default
110 number of entries is 20.
115 <literal>scanstep</literal> <replaceable>step</replaceable>
119 Set step-size for scan. This value is used in next scan
120 sent to the target. By default step-size is 0.
124 <varlistentry id="sortspec"><term>
125 <literal>sort</literal> <replaceable>sortspecs</replaceable>
128 <para>Sorts a result set. The sort command takes a
129 sequence of sort specifications. A sort
130 specification holds a field (sort criteria) and is followed by flags.
131 If the sort criteria includes <literal>=</literal> it is assumed
132 that the sort SortKey is of type sortAttributes using Bib-1.
133 The integer before <literal>=</literal> is
134 the attribute type and the integer following <literal>=</literal>
135 is the attribute value.
136 If no <literal>=</literal> is in the SortKey it is treated as a
137 sortfield-type of type InternationalString.
138 Flags observed are: <literal>s</literal>
139 for case sensitive, <literal>i</literal> for case insensitive,
140 <literal><</literal> for sort ascending and <literal>></literal>
146 <literal>sort+</literal>
149 <para>Same as <literal>sort</literal> but stores the sorted
150 result set in a new result set.
155 <literal>authentication</literal> <replaceable>openauth</replaceable>
158 <para>Sets up a authentication string if a server requires
159 authentication (v2 OpenStyle). The authentication string is first
160 sent to the server when the <literal>open</literal> command is
161 issued and the Z39.50 Initialize Request is sent, so this command
162 must be used before <literal>open</literal> in order to be effective.
163 A common convention for the <replaceable>authopen</replaceable> string
164 is that the username - and password is separated by a slash, e.g.
165 <literal>myusername/mysecret</literal>.
171 <literal>list_all</literal>
174 <para>This command displays status and values for many settings.
180 <literal>lslb</literal> <replaceable>n</replaceable>
183 <para>Sets the limit for when no records should be returned
184 together with the search result.
187 url="http://lcweb.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
196 <literal>ssub</literal> <replaceable>n</replaceable>
199 <para>Sets the limit for when all records should be returned with
203 url="http://lcweb.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
205 </ulink> for more details.
211 <literal>mspn</literal> <replaceable>n</replaceable>
214 <para>Sets the number of records should be returned if the
215 number of records in the result set is between the values of
216 <literal>lslb</literal> and <literal>ssub</literal>.
219 url="http://lcweb.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
227 <literal>status</literal>
230 <para>Displays the values of <literal>lslb</literal>,
231 <literal>ssub</literal> and <literal>mspn</literal>.
236 <literal>setname</literal>
239 <para>Switches named result sets on and off. Default is on.
244 <literal>cancel</literal>
247 <para>Sends a Trigger Resource Control Request to the target.
252 <literal>format</literal> <replaceable>oid</replaceable>
255 <para>Sets the preferred transfer syntax for retrieved records.
256 yaz-client supports all the record syntaxes that currently
259 url="http://lcweb.loc.gov/z3950/agency/defns/oids.html#5">
262 for more details. Commonly used records syntaxes include usmarc,
268 <literal>elements</literal> <replaceable>e</replaceable>
271 <para>Sets the element set name for the records. Many targets support
272 element sets are B (for brief) and F (for full).
277 <literal>close</literal>
280 <para>Sends a Z39.50 Close APDU and closes connection with the peer
285 <literal>querytype</literal> <replaceable>type</replaceable>
288 <para>Sets the query type as used by command <literal>find</literal>.
289 The following is supported:
290 <literal>prefix</literal> for
291 <link linkend="PQF">Prefix Query Notation</link> (Type-1 Query);
292 <literal>ccl</literal> for CCL search (Type-2 Query),
293 <literal>cql</literal> for CQL (Type-104 search with CQL OID),
294 <literal>ccl2rpn</literal> for
295 <link linkend="CCL">CCL</link> to RPN conversion (Type-1 Query).
296 <literal>cql2rpn</literal> for
297 CQL to RPN conversion (Type-1 Query).
302 <literal>attributeset</literal> <replaceable>set</replaceable>
306 Sets attribute set OID for prefix queries (RPN, Type-1).
311 <literal>refid</literal> <replaceable>id</replaceable>
314 <para>Sets reference ID for Z39.50 Request(s).
319 <literal>itemorder</literal>
320 <replaceable>type</replaceable> <replaceable>no</replaceable>
323 <para>Sends an Item Order Request using the ILL External.
324 <replaceable>type</replaceable> is either 1 or 2 which corresponds to
325 ILL-Profile 1 and 2 respectively. The <replaceable>no</replaceable>
326 is the Result Set position of the record to be ordered.
331 <literal>update</literal>
334 <para>Sends Item Update Request. This command sends a "minimal"
335 PDU Update to the target supplying the last received record from
337 If no record has been received from the target this command is ignored
338 and nothing is sent to the target.
345 <replaceable>filename</replaceable>
348 <para>Executes list of commands from
349 file <replaceable>filename</replaceable>, just like source on
357 <replaceable>args</replaceable>
360 <para>Executes command <replaceable>args</replaceable> in subshell
361 using the <literal>system</literal> call.
367 <literal>push_commande</literal>
368 <replaceable>command</replaceable>
371 <para>The push_command takes another command as its argument.
372 That command is then added to the history information (so
373 you can retrieve it later). The command itself is not
374 executed. This command only works if you have GNU readline/history
381 <literal>set_apdufile</literal>
382 <replaceable>filename</replaceable>
385 <para>Sets that APDU should be logged to file
386 <replaceable>filename</replaceable>. This command does the
387 thing as option <literal>-a</literal>.
393 <literal>set_auto_reconnect</literal>
394 <replaceable>flag</replaceable>
397 <para>Specifies whether YAZ client automatically reconnect if
398 target closes connection (Z39.50 only).
399 <replaceable>flag</replaceable> must be either
400 <literal>on</literal> or <literal>off</literal>.
406 <literal>set_marcdump</literal>
407 <replaceable>filename</replaceable>
410 <para>Specifies that all retrieved records should be appended ot
411 file <replaceable>filename</replaceable>. This command does the
412 thing as option <literal>-m</literal>.
418 <literal>schema</literal>
419 <replaceable>schemaid</replaceable>
422 <para>Specifies schema for retrieval.
423 Schema may be specified as an OID for Z39.50.
424 For SRW, schema is a simple string URI.
430 <literal>charset</literal>
431 <replaceable>negotiationcharset</replaceable>
432 [<replaceable>displaycharset</replaceable>]
433 [[<replaceable>marccharset</replaceable>]]
436 <para>Specifies character set (encoding) for Z39.50
437 negotiation / SRW encoding and/or character set for output (terminal).
440 <replaceable>negotiationcharset</replaceable> is the name
441 of the character set to be negotiated by the server. The special name
442 <literal>-</literal> for <replaceable>negotiationcharset</replaceable>
443 specifies <emphasis>no</emphasis> character set to be negotiated.
446 If <replaceable>displaycharset</replaceable> is given, it specifies name
447 of the character set of the output (on the terminal on which
448 YAZ client is running). To disable conversion of characters
449 to the output encoding, the special name <literal>-</literal> (dash)
451 If the special name <literal>auto</literal> is given, YAZ client will
452 convert strings to the encoding of the
453 terminal as returned by <function>nl_langinfo</function> call.
456 If <replaceable>marcharset</replaceable> is given, it specifies name
457 of the character set of retrieved MARC records from server. See
458 also <literal>marcharset</literal> command.
462 Since character set negotation takes effect in the Z39.50
463 Initialize Request you should issue this command before
464 command <literal>open</literal> is used.
469 MARC records are not covered by Z39.50 character set negotiation,
470 so that's why there is a separate character that must be known
471 in order to do meaningful converson(s).
478 <literal>negcharset</literal>
479 <replaceable>charset</replaceable>
482 <para>Specifies character set for negotiation (Z39.50). The
483 argument is the same as second argument for command
484 <literal>charset</literal>.
490 <literal>displaycharset</literal>
491 <replaceable>charset</replaceable>
494 <para>Specifies character set for output (display). The
495 argument is the same as second argument for
496 command <literal>charset</literal>.
502 <literal>marccharset</literal>
503 <replaceable>charset</replaceable>
506 <para>Specifies character set for retrieved MARC records so
507 that YAZ client can display them in a character suitable
508 for your display. See <literal>charset</literal> command.
509 If <literal>auto</literal> is given, YAZ will assume
510 that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1
511 for all other MARC variants. The charset argument is the
512 same as third argument for <literal>charset</literal> command.
518 <literal>set_cclfile</literal>
519 <replaceable>filename</replaceable>
522 <para>Specifies that CCL fields should be read from file
523 file <replaceable>filename</replaceable>. This command does the
524 thing as option <literal>-c</literal>.
530 <literal>set_cqlfile</literal>
531 <replaceable>filename</replaceable>
534 <para>Specifies that CQL fields should be read from file
535 file <replaceable>filename</replaceable>. This command does the
536 thing as option <literal>-q</literal>.
542 <literal>register_oid</literal>
543 <replaceable>name</replaceable>
544 <replaceable>class</replaceable>
545 <replaceable>OID</replaceable>
548 <para>This command allows you to register your own object
549 identifier - so that instead of entering a long dot-notation
550 you can use a short name instead.
551 The <replaceable>name</replaceable> is your
552 name for the OID, <replaceable>class</replaceable> is the
553 class, and <replaceable>OID</replaceable> is the raw OID in
554 dot notation. Class is one <literal>appctx</literal>,
555 <literal>absyn</literal>, <literal>attet</literal>,
556 <literal>transyn</literal>, <literal>diagset</literal>,
557 <literal>recsyn</literal>, <literal>resform</literal>,
558 <literal>accform</literal>, <literal>extserv</literal>,
559 <literal>userinfo</literal>, <literal>elemspec</literal>,
560 <literal>varset</literal>, <literal>schema</literal>,
561 <literal>tagset</literal>, <literal>general</literal>.
562 If you're in doubt use the <literal>general</literal>
569 <literal>register_tab</literal>
570 <replaceable>command</replaceable>
571 <replaceable>string</replaceable>
574 <para>This command registers a TAB completion string for
581 <literal>sleep</literal>
582 <replaceable>seconds</replaceable>
585 <para>This command makes YAZ client sleep (be idle) for
586 the number of seconds given.
592 <literal>zversion</literal>
593 <replaceable>ver</replaceable>
596 <para>This command sets Z39.50 version for negotiation.
597 Should be used before <literal>open</literal>.
598 By default, 3 (version 3) is used.
604 <literal>options</literal>
605 <replaceable>op1 op2..</replaceable>
608 <para>This command sets Z39.50 options for negotiation.
609 Should be used before <literal>open</literal>.
612 The following options are supported:
613 <literal>search</literal>,
614 <literal>present</literal>,
615 <literal>delSet</literal>,
616 <literal>resourceReport</literal>,
617 <literal>triggerResourceCtrl</literal>,
618 <literal>resourceCtrl</literal>,
619 <literal>accessCtrl</literal>,
620 <literal>scan</literal>,
621 <literal>sort</literal>,
622 <literal>extendedServices</literal>,
623 <literal>level_1Segmentation</literal>,
624 <literal>level_2Segmentation</literal>,
625 <literal>concurrentOperations</literal>,
626 <literal>namedResultSets</literal>,
627 <literal>encapsulation</literal>,
628 <literal>resultCount</literal>,
629 <literal>negotiationModel</literal>,
630 <literal>duplicationDetection</literal>,
631 <literal>queryType104</literal>,
632 <literal>pQESCorrection</literal>,
633 <literal>stringSchema</literal>.
639 <!-- Keep this comment at the end of the file
644 sgml-minimize-attributes:nil
645 sgml-always-quote-attributes:t
648 sgml-parent-document: "yaz.xml"
649 sgml-local-catalogs: nil
650 sgml-namecase-general:t