3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
8 .TH "YAZ\-CLIENT" "1" "09/04/2006" "YAZ 2.1.28" ""
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 yaz\-client \- Z39.50/SRU client for implementors
17 \fByaz\-client\fR [\fB\-a\ \fR\fB\fIfilename\fR\fR] [\fB\-b\ \fR\fB\fIfilename\fR\fR] [\fB\-c\ \fR\fB\fIfilename\fR\fR] [\fB\-d\ \fR\fB\fIdump\fR\fR] [\fB\-k\ \fR\fB\fIsize\fR\fR] [\fB\-m\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIaddr\fR\fR] [\fB\-q\ \fR\fB\fIfilename\fR\fR] [\fB\-u\ \fR\fB\fIauth\fR\fR] [\fB\-xV\fR] [addr]
22 is a Z39.50/SRU client (origin) with a simple command line interface that allows you to test behavior and performance of Z39.50 targets and SRU servers.
26 is specified, the client creates a connection to the Z39.50/SRU target at the address given.
30 is invoked it attemps to read the following files:
32 (home directory, Unix only) and
34 (current directory \- any platform) For those files that are readable, the YAZ client executes commands in those files. See COMMANDS section for description of commands.
38 If specified, logging of protocol packages will be appended file given. If
41 \-, the output is written to
45 If specified, YAZ will dump BER data in readable notation to the file specified. If
49 the output is written to
53 If specified, CCL configuration will be read from the file given.
56 If specified, YAZ will dump BER data for all PDUs sent and received to individual files, named
57 \fIdump\fR.DDD.raw, where DDD is 001, 002, 003, ..
60 Sets preferred messages and maximum record size for Initialize Request in kilobytes. Default value is 1024 (1 MB).
63 If specified, retrieved records will be appended to the file given.
66 If specified, the client will use the proxy at the address given.
69 If specified, CQL configuration will be read from the file given.
74 string will be used for authentication.
80 Makes the YAZ client print hex dumps of packages sent and received on standard output.
83 The YAZ client accepts the following commands.
86 Opens a connection to a server. The syntax for
88 is the same as described above for connecting from the command line.
92 [(tcp|ssl|unix|http)':']\fIhost\fR
93 [:\fIport\fR][/\fIbase\fR]
99 Sends a Search Request using the
101 given. By default the query is assumed to be PQF. See command
105 Deletes result set with name
109 base \fIbase1\fR \fIbase2\fR ...
110 Sets the name(s) of the database(s) to search. One or more databases may be specified separated by blanks. This commands overrides the database given in
113 show [\fIstart\fR[+\fInumber\fR]]
114 Fetches records by sending a Present Request from the start position given by
116 a number of records given by
119 is not given, then the client will fetch from position of the last retrieved record plus 1. If
121 is not given, then one record will be fetched at a time.
124 Scans database index for a term. The syntax resembles the syntax for
125 find. If you want to scan for the word
135 but if you want to scan only in, say the title field, you would write
145 Sets preferred position for scan. This value is used in next scan. By default position is 1.
148 Sets number of entries to be returned by scan. Default number of entries is 20.
151 Set step\-size for scan. This value is used in next scan sent to the target. By default step\-size is 0.
154 Sorts a result set. The sort command takes a sequence of space\-separated sort specifications, with each sort specification consisting of two space\-separated words (so that the whole specification list is made up of an even number of words). The first word of each specification holds a field (sort criterion) and the second holds flags. If the sort criterion includes
156 it is assumed that the
160 using Bib\-1: in this case the integer before
162 is the attribute type and the integer following
164 is the attribute value. If no
166 is in the criterion it is treated as a sortfield of type InternationalString. The flags word of each sort specification must consist of
168 for case sensitive or
170 for case insensitive, and
172 for ascending order or
174 for descending order.
179 but stores the sorted result set in a new result set.
181 authentication \fIopenauth\fR
182 Sets up a authentication string if a server requires authentication (v2 OpenStyle). The authentication string is first sent to the server when the
184 command is issued and the Z39.50 Initialize Request is sent, so this command must be used before
186 in order to be effective. A common convention for the
188 string is that the username \- and password is separated by a slash, e.g.
192 Selects SRU method. Must be one of
199 This command displays status and values for many settings.
202 Sets the limit for when no records should be returned together with the search result. See the
203 [1]\&\fI Z39.50 standard \fR
207 Sets the limit for when all records should be returned with the search result. See the
208 [1]\&\fI Z39.50 standard \fR
212 Sets the number of records should be returned if the number of records in the result set is between the values of
216 [1]\&\fI Z39.50 standard \fR
220 Displays the values of
227 Switches named result sets on and off. Default is on.
230 Sends a Trigger Resource Control Request to the target.
233 Sets the preferred transfer syntax for retrieved records. yaz\-client supports all the record syntaxes that currently are registered. See
234 [2]\&\fI Z39.50 Standard \fR
235 for more details. Commonly used records syntaxes include usmarc, sutrs, grs1 and xml.
238 Sets the element set name for the records. Many targets support element sets are B (for brief) and F (for full).
241 Sends a Z39.50 Close APDU and closes connection with the peer
244 Sets the query type as used by command
245 find. The following is supported:
248 Prefix Query Notation
251 for CCL search (Type\-2 Query),
253 for CQL (Type\-104 search with CQL OID),
257 to RPN conversion (Type\-1 Query).
259 for CQL to RPN conversion (Type\-1 Query).
261 attributeset \fIset\fR
262 Sets attribute set OID for prefix queries (RPN, Type\-1).
265 Sets reference ID for Z39.50 Request(s).
267 itemorder \fItype\fR \fIno\fR
268 Sends an Item Order Request using the ILL External.
270 is either 1 or 2 which corresponds to ILL\-Profile 1 and 2 respectively. The
272 is the Result Set position of the record to be ordered.
274 update \fIaction\fR \fIrecid\fR \fIdoc\fR
275 Sends Item Update Request. The
277 argument must be the action type: one of
282 update. The second argument,
283 \fIrecid\fR, is the record identifier (any string). Third argument which is optional is the record document for the request. If doc is a quoted string (double quotes) the string content is used verbatim. If doc is not a quoted string, it is assumed to be a filename which is read, then sent as the docuemnt content. If doc is omitted, the last received record (as parf of present response or piggybacked search response) is used for the update.
286 Executes list of commands from file
287 \fIfilename\fR, just like source on most UNIX shells.
292 in subshell using the
296 push_command \fIcommand\fR
297 The push_command takes another command as its argument. That command is then added to the history information (so you can retrieve it later). The command itself is not executed. This command only works if you have GNU readline/history enabled.
299 set_apdufile \fIfilename\fR
300 Sets that APDU should be logged to file
301 \fIfilename\fR. Another way to achieve APDU log is by using command\-line option
304 set_auto_reconnect \fIflag\fR
305 Specifies whether YAZ client automatically reconnect if target closes connection (Z39.50 only).
314 set_auto_wait \fIflag\fR
315 Specifies whether YAZ client should wait for response protocol packages after a request. By default YAZ client waits (on) for response packages immediately after a command (find, show) has been issued. If
317 is used, YAZ client does not attempt to receive packages automatically. These will have to be manually received when command
328 set_marcdump \fIfilename\fR
329 Specifies that all retrieved records should be appended to file
330 \fIfilename\fR. This command does the thing as option
333 schema \fIschemaid\fR
334 Specifies schema for retrieval. Schema may be specified as an OID for Z39.50. For SRU, schema is a simple string URI.
336 charset \fInegotiationcharset\fR [\fIdisplaycharset\fR] [[\fImarccharset\fR]]
337 Specifies character set (encoding) for Z39.50 negotiation / SRU encoding and/or character set for output (terminal).
340 \fInegotiationcharset\fR
341 is the name of the character set to be negotiated by the server. The special name
344 \fInegotiationcharset\fR
347 character set to be negotiated.
351 is given, it specifies name of the character set of the output (on the terminal on which YAZ client is running). To disable conversion of characters to the output encoding, the special name
353 (dash) can be used. If the special name
355 is given, YAZ client will convert strings to the encoding of the terminal as returned by
361 is given, it specifies name of the character set of retrieved MARC records from server. See also
366 .nr an-no-space-flag 1
370 Since character set negotation takes effect in the Z39.50 Initialize Request you should issue this command before command
375 .nr an-no-space-flag 1
379 MARC records are not covered by Z39.50 character set negotiation, so that's why there is a separate character that must be known in order to do meaningful converson(s).
381 negcharset \fIcharset\fR
382 Specifies character set for negotiation (Z39.50). The argument is the same as second argument for command
385 displaycharset \fIcharset\fR
386 Specifies character set for output (display). The argument is the same as second argument for command
389 marccharset \fIcharset\fR
390 Specifies character set for retrieved MARC records so that YAZ client can display them in a character suitable for your display. See
394 is given, YAZ will assume that MARC21/USMARC is using MARC8/UTF8 and ISO\-8859\-1 for all other MARC variants. The charset argument is the same as third argument for command
397 set_cclfile \fIfilename\fR
398 Specifies that CCL fields should be read from file file
399 \fIfilename\fR. This command does the thing as option
402 set_cqlfile \fIfilename\fR
403 Specifies that CQL fields should be read from file file
404 \fIfilename\fR. This command does the thing as option
407 register_oid \fIname\fR \fIclass\fR \fIOID\fR
408 This command allows you to register your own object identifier \- so that instead of entering a long dot\-notation you can use a short name instead. The
410 is your name for the OID,
414 is the raw OID in dot notation. Class is one
429 general. If you're in doubt use the
433 register_tab \fIcommand\fR \fIstring\fR
434 This command registers a TAB completion string for the command given.
437 This command makes YAZ client sleep (be idle) for the number of seconds given.
439 wait_response [ \fInumber\fR]
440 This command makes YAZ client wait for a number of response packages from target. If
442 is omitted, 1 is assumed.
444 This command is rarely used and is only useful if command
448 xmles \fIOID\fR \fIdoc\fR
449 Sends XML Extended Services request using the OID and doc given.
452 This command sets Z39.50 version for negotiation. Should be used before
453 open. By default 3 (version 3) is used.
455 options \fIop1 op2..\fR
456 This command sets Z39.50 options for negotiation. Should be used before
459 The following options are supported:
472 concurrentOperations,
477 duplicationDetection,
484 \fIyaz\-<version>/client/client.c\fR
490 \fI$HOME/.yazclientrc\fR
496 Section "The YAZ Client" in the YAZ manual.
498 Section "Prefix Query Format" in the YAZ manual.
500 Section "Common Command Language" in the YAZ manual.
502 Section "Common Query Language" in the YAZ manual.
506 \%http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6
509 \%http://www.loc.gov/z3950/agency/defns/oids.html#5