Empress Software C/C++ Kernel Level Interface - mr Routines
Empress v8.62
May 2006

© 1983, 2006 Empress Software Inc.

All rights reserved. Reproduction of this document in whole or part, by electronic or any other means, is prohibited without written consent from Empress Software Inc.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at 52.227-7013.

05/06


This manual provides a references section for all the mr routines. Detailed examples accompany each routine that can be compiled and run. This manual can also be used as a tutorial as well as a reference guide for mr routines.


Table of Contents

CHAPTER 1: Introduction

1.1 Overview
1.2 The mr Layer as a Virtual Database Machine
1.3 Comparing Empress mr and mx Interfaces
1.4 C Language Version Supported
1.5 Database Used for the Examples
1.6 References

CHAPTER 2: The mr Routines

2.1 Introduction
2.2 Accessing the mr Routines

2.2.1 The Header File mscc.h
2.2.2 Initialization and Cleanup
2.2.3 Compiling and Linkings

2.3 Internal, External, and File Attribute Formats
2.4 Data Type Correspondences
2.5 Handling Normal Failures
2.6 Empress File Quotas
2.7 Naming Conventions
2.8 Empress Internal Procedure Names
2.9 General Overview of the mr Routines
2.10 Database, Table, and Attribute Names
2.11 Error Messages
2.12 Locking
2.13 Portability

CHAPTER 3: Example Programs

3.1 Introduction
3.2 Opening and Closing Tables
3.3 Opening the Data Dictionary
3.4 Checking Database Names
3.5 Locks
3.6 Getting Attribute Descriptors
3.7 Finding the Name of an Attribute
3.8 Getting Record Descriptors
3.9 Entering Attribute Values into Records
3.10 Adding Records to a Table
3.11 Retrieving Records

3.11.1 Initializing Retrievals
3.11.2 Fetching Records
3.11.3 Allocating Space for Attribute Value Storage
3.11.4 Retrieving Attribute Values

3.11.4.1 External Representations
3.11.4.2 Internal Representations

3.11.5 Cleaning Up after Retrievals
3.11.6 Functions - COUNT, MAX, MIN, SUM, AVG
3.11.7 Examples

3.12 Comparisons

3.12.1 Converting Values to File Format

3.13 Qualifications

3.13.1 Comparison with a Constant
3.13.2 Comparison with a Range
3.13.3 Comparison with Another Attribute
3.13.4 Comparison with a Pattern
3.13.5 Comparison with NULL
3.13.6 Combining Qualifications

3.14 Deleting Records
3.15 Updating Records
3.16 Saving a Record for Later Use

3.16.1 Saving a Record in Memory
3.16.2 Saving a Pointer to a Record

3.17 Record-Level Locks
3.18 Transactions
3.19 Expressions

3.19.1 Using Expressions
3.19.2 Building Expressions
3.19.3 Empress Values and C Variables
3.19.4 Specifying Data Types to Routines
3.19.5 Examples

3.20 Printing Error Messages - mrprterr and mrerrmsg
3.21 Manipulating Bulk Data
3.22 Data Streaming

3.22.1 Example for Data Insertion
3.22.2 Example for Data Retrieval
3.22.3 Example for Data Modification

CHAPTER 4: Manual Pages