X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fclient.xml;h=48c699df52d0e8a528849b47dcae33f186d132ae;hb=5a018835d3e6920aafca465862c37c2b2ba93a03;hp=d7d60e6b3ac08fa19e711eb05493d55105073c99;hpb=fe4182bf1ca7bebcb3172cde916d4467c2154e7b;p=yaz-moved-to-github.git diff --git a/doc/client.xml b/doc/client.xml index d7d60e6..48c699d 100644 --- a/doc/client.xml +++ b/doc/client.xml @@ -1,31 +1,39 @@ - - The YAZ client - Introduction + + The YAZ client + Introduction - yaz-client is a linemode Z39.50 client. It supports a fair amount - of the functionality of the Z39.50-1995 standard, but some things you - need to enable or disable by recompilation. - Its primary purpose is to exercise the - package, and verify that the protocol works OK. + yaz-client is a line-mode Z39.50 client. It supports a fair amount + of the functionality of the Z39.50-1995 standard + Its primary purpose is to exercise the package, and verify that + the protocol works OK. For the same reason some commands offers more functionality than others. - Commands that exercies common Z39.50 services such as search and present + Commands that exercises common Z39.50 services such as search and present have more features than less common supported services, such as Extended Services (ItemOrder, ItemUpdate,..). - Invoking the YAZ client + Invoking the YAZ client It can be started by typing - - yaz-client [options] [zurl] - + + yaz-client + -m fname + -a fname + -c fname + -v level + -p target + -u auth + -k size + zurl + + in a UNIX shell / WIN32 console. The zurl, specifies a Z39.50 host and, if specified, the client first tries to establish connection with the Z39.50 target on the host. - Options are, as usual, are prefixed by - followed - by a particular letter. + Options are prefixed by - followed by a + particular letter. The following options are supported: @@ -34,10 +42,10 @@ -m fname - ISO2709 records are appended to file - fname. All records as returned by a target(s) - in Search Responses and Present Responses are appended verbatim to - the file. + All retrieved transfer records are appended to file + fname. All records as returned by a + target(s) in Search Responses and Present Responses are appended + verbatim to the file. @@ -61,16 +69,45 @@ -v level Sets the LOG level to level. - Level is a sequence of tokens separated by comman. Each token + Level is a sequence of tokens separated by comma. Each token is a integer or a named LOG item - one of fatal, debug, warn, log, + malloc, all, none. + + -p target + + Specifies proxy address. When set YAZ client will + connect to a proxy on the address and port given. + The actual target will be specified as part of the InitRequest + to inform the proxy about actual target. + + + + -u auth + + Specifies authentication. Usually the form + user/password + is used. This option does the same thing as the + auth command. + + + + + -k size + + Specifies the maximum messages size in kilobytes. + The default maximum messages for the YAZ client is 1024 + (1 MB). + + + In order to connect to Index Data's test Z39.50 server on @@ -87,11 +124,19 @@ yaz-client -a - localhost + + The following command connects to a local server via UNIX + socket /tmp/yaz and sets maximum message size to + 5 MB. + + + yaz-client -k 5120 unix:/tmp/yaz + - YAZ client commands + Commands When the YAZ client has read options and connected to a target, if given, - it will display Z > and away your command. + it will display Z> and await your command. Commands are executed by hitting the return key. You can always issue the command ? to see the list of available commands. @@ -104,7 +149,6 @@ open zurl - o Opens a connection to a server. The syntax for zurl is the same as described @@ -114,23 +158,22 @@ Syntax: - [(tcp|osi)':'<[tsel/]]host[:port][/base>] + [(tcp|ssl|unix)':']host + [:port][/base>] quit - q Ends YAZ client f query - f - Sends Search Request using the query + Sends a Search Request using the query given. @@ -154,7 +197,8 @@ - show [start[+number]] + show + [start[+number]] s @@ -162,10 +206,10 @@ position given by start a number of records given by number. If - start is not given the client will - fetch from position of the last retrieved record plus 1. If - number is not given one record will be - fetched at a time. + start is not given, then the client + will fetch from position of the last retrieved record plus 1. If + number is not given, then one record will + be fetched at a time. @@ -190,12 +234,12 @@ - + sort sortspecs - Sorts a result set. The sort command takes a sequence of - sort specifications. A sort + Sorts a result set. The sort command takes a + sequence of sort specifications. A sort specification holds a field (sort criteria) and is followed by flags. If the sort criteria includes = it is assumed that the sort SortKey is of type sortAttributes using Bib-1. @@ -229,6 +273,9 @@ sent to the server when the open command is issued and the Z39.50 Initialize Request is sent, so this command must be used before open in order to be effective. + A common convention for the authopen string + is that the username - and password is separated by a slash, e.g. + myusername/mysecret. @@ -373,7 +420,7 @@ Sends an Item Order Request using the ILL External. - type is either 1 or 2 which correponds to + type is either 1 or 2 which corresponds to ILL-Profile 1 and 2 respectively. The no is the Result Set position of the record to be ordered. @@ -384,15 +431,117 @@ Sends Item Update Request. This command sends a "minimal" - PDU to the target supplying the last received record from the target. + PDU Update to the target supplying the last received record from + the target. If no record has been received from the target this command is ignored and nothing is sent to the target. + + + . + filename + + + Executes list of commands from + file filename, just like source on + most UNIX shells. + + + + + + ! + args + + + Executes command args in subshell + using the system call. + + + + + + push_commande + command + + + 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. + + + + + + set_apdufile + filename + + + Sets that APDU should be logged to file + filename. This command does the + thing as option -a. + + + + + + set_marcdump + filename + + + Specifies that all retrieved records should be appended ot + file filename. This command does the + thing as option -m. + + + + + + set_cclfields + filename + + + Specifies that CCL fields should be read from file + file filename. This command does the + thing as option -c. + + + + + + register_oid + name + class + OID + + + 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 name is your + name for the OID, class is the + class, and OID is the raw OID in + dot notation. Class is one appctx, + absyn, attet, + transyn, diagset, + recsyn, resform, + accform, extserv, + userinfo, elemspec, + varset, schema, + tagset, general. + If you're in doubt use the general + class. + + + + - Searching + Searching The simplest example of a Prefix Query would be something like @@ -422,7 +571,7 @@ f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather - For the full specifiction of the Prefix Query see the section + For the full specification of the Prefix Query see the section Prefix Query Format. @@ -438,7 +587,7 @@ sgml-indent-step:1 sgml-indent-data:t sgml-parent-document: "yaz.xml" - sgml-local-catalogs: "../../docbook/docbook.cat" + sgml-local-catalogs: nil sgml-namecase-general:t End: -->