Chapter 3. ZOOM

Table of Contents

1. Connections
1.1. Z39.50 Protocol behavior
1.2. SRU Protocol behavior
2. Queries
2.1. Protocol behavior
3. Result sets
3.1. Z39.50 Protocol behavior
3.2. SRU Protocol behavior
4. Records
4.1. Z39.50 Protocol behavior
4.2. SRU Protocol behavior
5. Scan
6. Extended Services
6.1. Item Order
6.2. Record Update
6.3. Database Create
6.4. Database Drop
6.5. Commit Operation
6.6. Protocol behavior
7. Options
8. Events

ZOOM is an acronym for 'Z39.50 Object-Orientation Model' and is an initiative started by Mike Taylor (Mike is from the UK, which explains the peculiar name of the model). The goal of ZOOM is to provide a common Z39.50 client API not bound to a particular programming language or toolkit.

Note

A recent addition to YAZ is SRU support. You can now make SRU ZOOM connections by specifying scheme http:// for the hostname for a connection. The dialect of SRU used is specified by the value of the connection's sru option, which may be SRU over HTTP GET (get), SRU over HTTP POST (post) or SRW (SRU over SOAP) (soap). Using the facility for embedding options in target strings, a connection can be forced to use SRU rather the SRW (the default) by prefixing the target string with sru=get,, like this: sru=get,http://sru.miketaylor.org.uk:80/sru.pl

The lack of a simple Z39.50 client API for YAZ has become more and more apparent over time. So when the first ZOOM specification became available, an implementation for YAZ was quickly developed. For the first time, it is now as easy (or easier!) to develop clients than servers with YAZ. This chapter describes the ZOOM C binding. Before going further, please reconsider whether C is the right programming language for the job. There are other language bindings available for YAZ, and still more are in active development. See the ZOOM web-site for more information.

In order to fully understand this chapter you should read and try the example programs zoomtst1.c, zoomtst2.c, .. in the zoom directory.

The C language misses features found in object oriented languages such as C++, Java, etc. For example, you'll have to manually, destroy all objects you create, even though you may think of them as temporary. Most objects has a _create - and a _destroy variant. All objects are in fact p