Empress Software Fortran Language Interface
Empress v8.62
May 2006

(Unix only)

© 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 describes three different Fortran language interfaces:

The above three interfaces are listed so that the complexity, and efficiency grows from the top of the list. This manual contains examples that can be compiled and run, so users using the Fortran Interface for the first time can have some hands-on experience. The manual also serves as a reference guide to the Fortran Interface.


Table of Contents

CHAPTER 1: Introduction

1.1 Fortran Language Version Supported
1.2 References
1.3 Strings in Fortran

CHAPTER 2: The Command Language Interface

2.1 The Header File
2.2 Initialization and Cleanup
2.3 Compiling and Linking
2.4 Examples Using the Command Language Interface

CHAPTER 3: SQL Precompiler

3.1 Introduction
3.2 Reserved Keywords
3.3 Synonyms
3.4 General Topics for the Precompiler
3.5 Databases and Tables
3.6 Multiple Record Operations

3.6.1 The Cursor
3.6.2 Declaring a Cursor
3.6.3 Processing a Selected Row
3.6.4 Updating/Deleting a Selected Row
3.6.5 Closing a Cursor
3.6.6 Multiple Cursors

3.7 Transactions
3.8 Variables

3.8.1 Declaring Fortran Variables
3.8.2 Shell Variables
3.8.3 Control Variables
3.8.4 Fetching and Control Variables
3.8.5 Inserting and Control Variables
3.8.6 WHERE Clause and Control Variables

3.9 SQL Communication Area (SQLCA)

3.9.1 Using the SQLCA
3.9.2 SQLCA Structure

3.10 Error Handling
3.11 Restrictions
3.12 Using the Precompiler

3.12.1 Separate Compilation

3.13 Example Program
3.14 Error Messages

3.14.1 Compile-time Error Messages
3.14.2 Runtime Error Messages

3.15 Command Reference

3.15.1 BEGIN DECLARE SECTION
3.15.2 CANCEL TRANSACTION
3.15.3 CLOSE CURSOR
3.15.4 CLOSE_TABLE
3.15.5 COMMIT TRANSACTION
3.15.6 DATABASE IS
3.15.7 DECLARE CURSOR
3.15.8 DELETE
3.15.9 END DECLARATION SECTION
3.15.10 EXIT
3.15.11 FETCH
3.15.12 FETCH_AGAIN
3.15.13 INCLUDE SQLCA
3.15.14 INIT
3.15.15 INSERT
3.15.16 OPEN CURSOR
3.15.17 OPEN_TABLE
3.15.18 SELECT INTO
3.15.19 START TRANSACTION
3.15.20 UPDATE
3.15.21 WHERE
3.15.22 WHENEVER

CHAPTER 4: Database Manipulation Language Interface

4.1 The mf Routines
4.2 Accessing the mf Routines

4.2.1 The Header File
4.2.2 Initialization and Cleanup
4.2.3 Compiling and Linking

4.3 Handling Normal Failures
4.4 Internal, External, and File Attribute Formats
4.5 Naming Conventions
4.6 General Overview of the mf Routines
4.7 Database, Table, and Attribute Names
4.8 Error Messages

4.8.1 Program Bug
4.8.2 Space Problem
4.8.3 User Error
4.8.4 Database Problem
4.8.5 File Problem

4.9 Examples Programs

4.9.1 Opening and Closing Tables
4.9.2 Checking for an Attribute
4.9.3 Entering Attribute Values into Records
4.9.4 Adding Records to a Table
4.9.5 Retrieving Records
4.9.6 Nesting Retrieval Loops
4.9.7 Qualification Building
4.9.8 Conjunctions of Qualifications
4.9.9 Comparing With a Constant
4.9.10 Selecting a Range of Values
4.9.11 Comparing Attributes
4.9.12 Match Operators
4.9.13 Comparing with Null
4.9.14 Complex Qualifications
4.9.15 Deleting Records
4.9.16 Updating Records

4.9.16.1 Using Character Strings
4.9.16.2 Using Internal Data Representations

4.9.17 Transactions

CHAPTER 5: Empress System Variables

CHAPTER 6: Manual Pages

6.1 mf Routines
6.2 Fortran Precompiler