YAZ User's Guide and Reference

Sebastian Hammer

Adam Dickmeiss

Mike Taylor

Heikki Levanto

Abstract

This document is the programmer's guide and reference to the YAZ package version 2.1.28. YAZ is a compact toolkit that provides access to the Z39.50 and SRW/SRU protocols, as well as a set of higher-level tools for implementing the server and client roles, respectively. The documentation can be used on its own, or as a reference when looking at the example applications provided with the package.


Table of Contents

1. Introduction
1. Reading this Manual
2. The API
2. Compilation and Installation
1. Introduction
2. UNIX
2.1. Compiling from source on Unix
2.2. How to make apps using YAZ on UNIX
3. WIN32
3.1. Compiling from Source on WIN32
3.2. How to make apps using YAZ on WIN32
3. ZOOM
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
4. Generic server
1. Introduction
2. The Database Frontend
3. The Backend API
4. Your main() Routine
5. The Backend Functions
5.1. Init
5.2. Search and retrieve
5.3. Delete
5.4. scan
6. Application Invocation
7. Virtual Hosts
5. The YAZ client
1. Introduction
2. Invoking the YAZ client
3. Commands
4. Searching
6. The Z39.50 ASN.1 Module
1. Introduction
2. Preparing PDUs
3. Object Identifiers
4. EXTERNAL Data
5. PDU Contents Table
7. SOAP and SRU
1. Introduction
2. HTTP
3. SOAP Packages
4. SRU
8. Supporting Tools
1. Query Syntax Parsers
1.1. Prefix Query Format
1.1.1. Using Proximity Operators with PQF
1.1.2. PQF queries
1.2. CCL
1.2.1. CCL Syntax
1.2.2. CCL Qualifiers
1.2.3. CCL API
1.3. CQL
1.3.1. CQL parsing
1.3.2. CQL tree
1.3.3. CQL to PQF conversion
1.3.4. Specification of CQL to RPN mappings
1.3.5. CQL to XCQL conversion
2. Object Identifiers
3. Nibble Memory
4. Log
5. MARC
9. The ODR Module
1. Introduction
2. Using ODR
2.1. ODR Streams
2.2. Memory Management
2.3. Encoding and Decoding Data
2.4. Printing
2.5. Diagnostics
2.6. Summary and Synopsis
3. Programming with ODR
3.1. The Primitive ASN.1 Types
3.1.1. INTEGER
3.1.2. BOOLEAN
3.1.3. REAL
3.1.4. NULL
3.1.5. OCTET STRING
3.1.6. BIT STRING
3.1.7. OBJECT IDENTIFIER
3.2. Tagging Primitive Types
3.3. Constructed Types
3.4. Tagging Constructed Types
3.4.1. Implicit Tagging
3.4.2. Explicit Tagging
3.5. SEQUENCE OF
3.6. CHOICE Types
4. Debugging
10. The COMSTACK Module
1. Synopsis (blocking mode)
2. Introduction
3. Common Functions
3.1. Managing Endpoints
3.2. Data Exchange
4. Client Side
5. Server Side
6. Addresses
7. SSL
8. Diagnostics
9. Summary and Synopsis
11. Future Directions
A. License
1. Index Data Copyright
2. Additional Copyright Statements
B. About Index Data
C. Credits

List of Figures

1.1. YAZ layers

List of Tables

3.1. ZOOM Connection Options
3.2. ZOOM Result set Options
3.3. Search Info Report options
3.4. ZOOM Scan Set Options
3.5. Extended Service Common Options
3.6. Item Order Options
3.7. Record Update Options
3.8. Database Create Options
3.9. Database Create Options
3.10. ZOOM Event IDs
6.1. Default settings for PDU Initialize Request
6.2. Default settings for PDU Initialize Response
6.3. Default settings for PDU Search Request
6.4. Default settings for PDU Search Response
6.5. Default settings for PDU Present Request
6.6. Default settings for PDU Present Response
6.7. Default settings for Delete Result Set Request
6.8. Default settings for Delete Result Set Response
6.9. Default settings for Scan Request
6.10. Default settings for Scan Response
6.11. Default settings for Trigger Resource Control Request
6.12. Default settings for Resource Control Request
6.13. Default settings for Resource Control Response
6.14. Default settings for Access Control Request
6.15. Default settings for Access Control Response
6.16. Default settings for Segment
6.17. Default settings for Close
8.1. Common Bib-1 attributes
8.2. Special attribute combos
8.3. CCL directives
9.1. ODR Error codes

List of Examples

4.1. Running the GFS on Unix
4.2. Setting up Apache as SRU Frontend
4.3. Running a server with local access only
8.1. PQF queries using simple terms
8.2. PQF boolean operators
8.3. PQF references to result sets
8.4. Attributes for terms
8.5. PQF Proximity queries
8.6. PQF specification of search term
8.7. PQF mixed queries
8.8. CCL queries
8.9. CCL profile
8.10. CQL to RPN mapping file
8.11. Display of MARC record
9.1. Encoding and decoding functions
9.2. Encoding and decoding of an integer
9.3. Element Path for record