Next Previous Contents

3. The First GILS Database

Having successfully acquired the software, it's time to try it out. The directory test under the main distribution directory contains a small sample database of GILS records.

NOTE: The records included in the distribution are part of a sample set provided by the US Geological Survey, as a service to GILS implementors. They are included for testing and demonstrating the software, and neither the USGS or Index Data nor anyone else should be held responsible for their contents.

If you cd to the test directory, the first thing to notice is the file zebra.cfg. There has to be a file like this present whenever you run Zebra - it establishes various settings and defaults, and we'll return to its contents below (a detailed description is found in the general Zebra documentation file).

The subdirectory records contains the sample records. We'll get back to them, too.

The first order of business is to index the sample records, and create the access files required by the Z39.50 server. To do this, position yourself in the test directory, and type the command

$ ../index/zebraidx update records

The indexing program will respond with a stream of control information, and when it completes, the database is ready. To start the Z39.50 server, type the command ../index/zebrasrv.

Assuming that nothing unfortunate happened, you are now running a GILS-compliant Z39.50 server on the port 9999 on your local machine (to learn how to run the server at a different port, and redirect the diagnostic output to a file, consult the section on Running zebrasrv in the general documentation). The database containing the sample records is named Default.

To test the server, you can use any compatible Z39.50 client. You can also use the simple demonstration client which is included with Zebra itself. To do this, start a new session on your machine (or put the server in the background). Change to the directory yaz/client under the main Zebra distribution directory. Now execute the command

$ ./client tcp:localhost:9999

If all went well, the client will tell you that it has established an association with your test server. To test it, try out these commands:

Z> find surficial
Z> show 1

The default retrieval syntax for the client is USMARC. To try other formats for the same record, try:

Z>format sutrs
Z>show 1
Z>format grs-1
Z>show 1
Z>elements B
Z>show 1

You can learn more about the sample client by reading the README file in the yaz directory.


Next Previous Contents