IBM Books

Building Applications for UNIX** Environments

IBM DB2 Universal Database
Building Applications
for UNIX** Environments

Version 5

S10J-8161-00


10J8161

Before using this information and the product it supports, be sure to read the general information under Appendix D. "Notices".

This document contains proprietary information of IBM. It is provided under a license agreement and is protected by copyright law. The information contained in this publication does not include any product warranties and any statements provided in this manual should not be interpreted as such.

Order publications through your IBM representative or the IBM branch office serving your locality or by calling 1-800-879-2755 in U.S. or 1-800-IBM-4YOU in Canada.

When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.

© Copyright International Business Machines Corporation 1993, 1997. All rights reserved.
Note to U.S. government Users -- Documentation related to restricted rights -- Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule contract with IBM Corp.


Table of Contents

About This Book

  • Who Should Use This Book
  • How To Use This Book
  • Highlighting Conventions
  • Chapter 1. About the DB2 Software Developer's Kit

  • Supported Servers
  • Supported Software by Platform
  • AIX
  • HP-UX
  • Solaris
  • Sample Programs
  • Chapter 2. Setup

  • Setting Your Environment
  • Installing, Cataloging, and Binding the SAMPLE Database
  • Installing
  • Cataloging
  • Binding
  • Where to Go Next
  • Chapter 3. Introduction to Embedded SQL Applications

  • Using the Micro Focus COBOL Compiler
  • About Stored Procedures and User-Defined Functions (UDFs)
  • C++ Considerations for UDFs and Stored Procedures
  • Error Checking
  • Chapter 4. Building AIX Embedded SQL Applications

  • IBM C
  • Building C Stored Procedures
  • Coding and Compiling Stored Procedures
  • Building C User-Defined Functions (UDFs)
  • Coding and Compiling UDFs
  • Multi-threaded Applications on AIX Version 4
  • IBM C Set++
  • Building C++ Stored Procedures
  • Multi-threaded Applications on AIX Version 4
  • IBM XL FORTRAN for AIX
  • Building FORTRAN Stored Procedures
  • Using the IBM XL FORTRAN for AIX Compiler
  • IBM COBOL Set for AIX
  • Building IBM COBOL Set for AIX Stored Procedures
  • Using the IBM COBOL Set for AIX Compiler
  • Micro Focus COBOL
  • Building Micro Focus COBOL Stored Procedures
  • Setting Up and Running REXX Programs
  • Chapter 5. Building HP-UX Embedded SQL Applications

  • HP-UX C/C++
  • Building C Stored Procedures
  • Building C User-Defined Functions (UDFs)
  • Multi-threaded Applications
  • HP FORTRAN/9000
  • Building FORTRAN Stored Procedures
  • Micro Focus COBOL
  • Building Micro Focus COBOL Stored Procedures
  • Chapter 6. Building Solaris Embedded SQL Applications

  • SPARCompiler C/C++
  • Building C Stored Procedures
  • Building C User-Defined Functions (UDFs)
  • Multi-threaded Applications
  • SPARCompiler FORTRAN
  • Building FORTRAN Stored Procedures
  • Micro Focus COBOL
  • Chapter 7. Building DB2 Call Level Interface (CLI) Applications

  • Coding a Script File by Platform
  • AIX
  • HP-UX
  • Solaris
  • Building and Running a CLI Program
  • Chapter 8. Building Java Applications and Applets

  • Setting Up the AIX Environment
  • Setting Up the HP-UX Environment
  • Setting Up the Solaris Environment
  • Building and Running a JDBC Application
  • Building and Running a JDBC Applet
  • Appendix A. About Database Manager Instances

    Appendix B. Problem Determination

    Appendix C. How the DB2 Library Is Structured

  • SmartGuides
  • Online Help
  • DB2 Books
  • About the Information Center
  • Appendix D. Notices

  • Trademarks
  • Trademarks of Other Companies
  • Appendix E. Contacting IBM

    Index


    About This Book

    This book explains how to build applications using the DB2 Software Developer's Kits (DB2 SDKs) for DB2 Universal Database Version 5 on the following UNIX operating systems:

    The book provides information to set up your environment for developing DB2 applications, and step-by-step instructions to compile, link, and run these applications in this environment.

    Different programming interfaces can be used to develop your applications:

    Embedded SQL
    Uses SQL statements that are precompiled before your program is compiled.

    DB2 Call Level Interface (CLI)
    Is a callable SQL interface based on the X/Open CLI specification, and is compatible with the Microsoft Corporation's Open Database Connectivity (ODBC).

    DB2 Application Programming Interfaces (APIs)
    Use DB2 administrative APIs in your applications to create administrative programs.

    For information on these programming interfaces, and to decide which one best fits your needs, refer to the Road Map to DB2 Programming, especially chapter 2, "Deciding which Programming Interface to Use".

    For more detailed information on each of the different programming interfaces, refer to:

    You will find the following books useful for further related information, such as detailed product installation and setup:

    For a complete list of the DB2 documentation library, see Appendix C. "How the DB2 Library Is Structured".


    [ Top of Page | Next Page | Index ]

    [ DB2 List of Books | Search the DB2 Books ]