YAZ User's Guide and Reference

Sebastian Hammer

Adam Dickmeiss

Mike Taylor

Heikki Levanto

3.0.14

Abstract

This document is the programmer's guide and reference to the YAZ package version 3.0.14. 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. GFS Configuration and Virtual Hosts
5. The YAZ client
1. Introduction
2. Invoking the YAZ client
3. Commands
4. Searching
6. ziffy
1. Introduction
2. Using Ziffy
7. The Z39.50 ASN.1 Module
1. Introduction
2. Preparing PDUs
3. Object Identifiers (YAZ 2)
4. EXTERNAL Data
5. PDU Contents Table
8. SOAP and SRU
1. Introduction
2. HTTP
3. SOAP Packages
4. SRU
9. 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
2.1. OID database
2.2. Standard OIDs
2.3. OID oident
3. Nibble Memory
4. Log
5. MARC
6. Retrieval Facility
6.1. Retrieval XML format
6.2. Retrieval Facility Examples
6.3. API
10. 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
11. 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
12. Future Directions
A. List of Object Identifiers
B. License
1. Index Data Copyright
2. Additional Copyright Statements
2.1. ziffy
2.2. CCL
C. About Index Data
D. 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 Drop Options
3.10. ZOOM Event IDs
7.1. Default settings for PDU Initialize Request
7.2. Default settings for PDU Initialize Response
7.3. Default settings for PDU Search Request
7.4. Default settings for PDU Search Response
7.5. Default settings for PDU Present Request
7.6. Default settings for PDU Present Response
7.7. Default settings for Delete Result Set Request
7.8. Default settings for Delete Result Set Response
7.9. Default settings for Scan Request
7.10. Default settings for Scan Response
7.11. Default settings for Trigger Resource Control Request
7.12. Default settings for Resource Control Request
7.13. Default settings for Resource Control Response
7.14. Default settings for Access Control Request
7.15. Default settings for Access Control Response
7.16. Default settings for Segment
7.17. Default settings for Close
9.1. Common Bib-1 attributes
9.2. Special attribute combos
9.3. CCL directives
10.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
6.1. Starting ziffy from the command line
9.1. PQF queries using simple terms
9.2. PQF boolean operators
9.3. PQF references to result sets
9.4. Attributes for terms
9.5. PQF Proximity queries
9.6. PQF specification of search term type
9.7. PQF mixed queries
9.8. CCL queries
9.9. CCL profile
9.10. CQL to RPN mapping file
9.11. CQL to RPN string attributes
9.12. CQL to RPN using Bath Profile
9.13. Create OID on stack
9.14. Using oid_oiddotstring_to_oid
9.15. Using odr_getoidbystr
9.16. Create OID with YAZ DB
9.17. Use a built-in OID
9.18. Display of MARC record
9.19. MARC21 backend
10.1. Encoding and decoding functions
10.2. Encoding and decoding of an integer
10.3. Element Path for record