Table of Contents

About DB2 UDB for AS/400 SQL Programming with Host Languages

  • Who should read the SQL Programming with Host Languages book
  • Assumptions Relating to Examples of SQL Statements in the SQL Programming with Host Languages book
  • How to interpret syntax diagrams in the SQL Programming with Host Languages book
  • What's new for Version 4 Release 5 in the SQL Programming with Host Languages book
  • Common Concepts and Rules for Using SQL with Host Languages

  • Writing applications that use SQL
  • Using Host Variables in SQL Statements
  • Assignment rules for host variables in SQL statements
  • Indicator variables in applications that use SQL
  • Handling SQL error return codes
  • Handling exception conditions with the WHENEVER Statement
  • Coding SQL Statements in C and C++ Applications

  • Defining the SQL Communications Area in C and C++ applications that use SQL
  • Defining SQL Descriptor Areas in C and C++ applications that use SQL
  • Embedding SQL statements in C and C++ applications that use SQL
  • Comments in C and C++ applications that use SQL
  • Continuation for SQL statements in C and C++ applications that use SQL
  • Including code in C and C++ applications that use SQL
  • Margins in C and C++ applications that use SQL
  • Names in C and C++ applications that use SQL
  • NULLs and NULs in C and C++ applications that use SQL
  • Statement labels in C and C++ applications that use SQL
  • Preprocessor sequence for C and C++ applications that use SQL
  • Trigraphs in C and C++ applications that use SQL
  • WHENEVER Statement in C and C++ applications that use SQL
  • Using host variables in C and C++ applications that use SQL
  • Declaring host variables in C and C++ applications that use SQL
  • Using host structures in C and C++ applications that use SQL
  • Host structure declarations in C and C++ applications that use SQL
  • Host structure indicator array in C and C++ applications that use SQL
  • Using arrays of host structures in C and C++ applications that use SQL
  • Host structure array in C and C++ applications that use SQL
  • Host structure array indicator structure in C and C++ applications that use SQL
  • Using pointer data types in C and C++ applications that use SQL
  • Using ILE C for AS/400 external file descriptions in C and C++ applications that use SQL
  • Determining equivalent SQL and C or C++ data types
  • Notes on C and C++ variable declaration and usage
  • Using indicator variables in C and C++ applications that use SQL
  • Coding SQL Statements in COBOL Applications

  • Defining the SQL Communications Area in COBOL applications that use SQL
  • Defining SQL Descriptor Areas in COBOL applications that use SQL
  • Embedding SQL statements in COBOL applications that use SQL
  • Comments in COBOL applications that use SQL
  • Continuation for SQL statements in COBOL applications that use SQL
  • Including code in COBOL applications that use SQL
  • Margins in COBOL applications that use SQL
  • Sequence numbers in COBOL applications that use SQL
  • Names in COBOL applications that use SQL
  • COBOL compile-time options in COBOL applications that use SQL
  • Statement labels in COBOL applications that use SQL
  • WHENEVER Statement in COBOL applications that use SQL
  • Multiple source COBOL programs and the SQL COBOL precompiler
  • Using host variables in COBOL applications that use SQL
  • Declaring host variables in COBOL applications that use SQL
  • Using host structures in COBOL applications that use SQL
  • Host structure in COBOL applications that use SQL
  • Host structure indicator array in COBOL applications that use SQL
  • Using host structure arrays in COBOL applications that use SQL
  • Host structure array in COBOL applications that use SQL
  • Host array indicator structure in COBOL applications that use SQL
  • Using external file descriptions in COBOL applications that use SQL
  • Using external file descriptions for host structure arrays in COBOL applications that use SQL
  • Determining equivalent SQL and COBOL data types
  • Notes on COBOL variable declaration and usage
  • Using indicator variables in COBOL applications that use SQL
  • Coding SQL Statements in PL/I Applications

  • Defining the SQL Communications Area in PL/I applications that use SQL
  • Defining SQL Descriptor Areas in PL/I applications that use SQL
  • Embedding SQL statements in PL/I applications that use SQL
  • Example: Embedding SQL statements in PL/I applications that use SQL
  • Comments in PL/I applications that use SQL
  • Continuation for SQL statements in PL/I applications that use SQL
  • Including code in PL/I applications that use SQL
  • Margins in PL/I applications that use SQL
  • Names in PL/I applications that use SQL
  • Statement labels in PL/I applications that use SQL
  • WHENEVER Statement in PL/I applications that use SQL
  • Using host variables in PL/I applications that use SQL
  • Declaring host variables in PL/I applications that use SQL
  • Using host structures in PL/I applications that use SQL
  • Host structures in PL/I applications that use SQL
  • Host structure indicator arrays in PL/I applications that use SQL
  • Using host structure arrays in PL/I applications that use SQL
  • Host structure array in PL/I applications that use SQL
  • Using external file descriptions in PL/I applications that use SQL
  • Determining equivalent SQL and PL/I data types
  • Using indicator variables in PL/I applications that use SQL
  • Differences in PL/I because of structure parameter passing techniques
  • Coding SQL Statements in RPG for AS/400 Applications

  • Defining the SQL Communications Area in RPG for AS/400 applications that use SQL
  • Defining SQL Descriptor Areas in RPG for AS/400 applications that use SQL
  • Embedding SQL statements in RPG for AS/400 applications that use SQL
  • Example: Embedding SQL statements in RPG for AS/400 applications that use SQL
  • Comments in RPG for AS/400 applications that use SQL
  • Continuation for SQL Statements in RPG for AS/400 applications that use SQL
  • Including code in RPG for AS/400 applications that use SQL
  • Sequence numbers in RPG for AS/400 applications that use SQL
  • Names in RPG for AS/400 applications that use SQL
  • Statement labels in RPG for AS/400 applications that use SQL
  • WHENEVER Statement in RPG for AS/400 applications that use SQL
  • Using host variables in RPG for AS/400 applications that use SQL
  • Declaring host variables in RPG for AS/400 applications that use SQL
  • Using host structures in RPG for AS/400 applications that use SQL
  • Using host structure arrays in RPG for AS/400 applications that use SQL
  • Using external file descriptions in RPG for AS/400 applications that use SQL
  • External file description considerations for host structure arrays in RPG for AS/400 applications that use SQL
  • Determining equivalent SQL and RPG for AS/400 data types
  • Notes on RPG for AS/400 variable declaration and usage in RPG for AS/400 applications that use SQL
  • Using indicator variables in RPG for AS/400 applications that use SQL
  • Example: Using indicator variables in RPG for AS/400 applications that use SQL
  • Differences in RPG for AS/400 because of structure parameter passing techniques
  • Correctly ending a called RPG for AS/400 program that uses SQL
  • Coding SQL Statements in ILE RPG for AS/400 Applications

  • Defining the SQL Communications Area in ILE RPG for AS/400 applications that use SQL
  • Defining SQL Descriptor Areas in ILE RPG for AS/400 applications that use SQL
  • Embedding SQL statements in ILE RPG for AS/400 applications that use SQL
  • Example: Using an SQL UPDATE statement in an ILE RPG for AS/400 program
  • Comments in ILE RPG for AS/400 applications that use SQL
  • Continuation for SQL statements in ILE RPG for AS/400 applications that use SQL
  • Including code in ILE RPG for AS/400 applications that use SQL
  • Sequence numbers in ILE RPG for AS/400 applications that use SQL
  • Names in ILE RPG for AS/400 applications that use SQL
  • Statement labels in ILE RPG for AS/400 applications that use SQL
  • WHENEVER statement in ILE RPG for AS/400 applications that use SQL
  • Using host variables in ILE RPG for AS/400 applications that use SQL
  • Declaring host variables in ILE RPG for AS/400 applications that use SQL
  • Using host structures in ILE RPG for AS/400 applications that use SQL
  • Using host structure arrays in ILE RPG for AS/400 applications that use SQL
  • Declaring LOB host variables in ILE RPG for AS/400 applications that use SQL
  • Using external file descriptions in ILE RPG for AS/400 applications that use SQL
  • External file description considerations for host structure arrays in ILE RPG for AS/400 applications that use SQL
  • Determining equivalent SQL and RPG data types
  • Notes on ILE RPG for AS/400 variable declaration and usage
  • Using indicator variables in ILE RPG for AS/400 applications that use SQL
  • Example: Using indicator variables in ILE RPG for AS/400 applications that use SQL
  • SQLDA Example of the SQLDA for a multiple row-area fetch in ILE RPG for AS/400 applications that use SQL
  • Coding SQL Statements in REXX Applications

  • Using the SQL Communications Area in REXX applications
  • Using SQL Descriptor Areas in REXX applications
  • Embedding SQL statements in REXX applications
  • Comments in REXX applications that use SQL
  • Continuation of SQL statements in REXX applications that use SQL
  • Including code in REXX applications that use SQL
  • Margins in REXX applications that use SQL
  • Names in REXX applications that use SQL
  • Nulls in REXX applications that use SQL
  • Statement labels in REXX applications that use SQL
  • Handling errors and warnings in REXX applications that use SQL
  • Using host variables in REXX applications that use SQL
  • Determining data types of input host variables in REXX applications that use SQL
  • The format of output host variables in REXX applications that use SQL
  • Avoiding REXX conversion in REXX applications that use SQL
  • Using indicator variables in REXX applications that use SQL
  • Preparing and Running a Program with SQL Statements

  • Basic Processes of the SQL Precompiler
  • Input to the SQL Precompiler
  • Source file CCSIDs in the SQL precompiler
  • Output from the SQL precompiler
  • Non-ILE SQL precompiler commands
  • Compiling a non-ILE application program that uses SQL
  • ILE SQL precompiler commands
  • Compiling an ILE application program that uses SQL
  • SQL precompiling for the VisualAge C++ for OS/400 compiler
  • Interpreting compile errors in applications that use SQL
  • Error and warning messages during a compile of application programs that use SQL
  • Binding an application that uses SQL
  • Program references in applications that use SQL
  • Displaying SQL precompiler options
  • Running a program with embedded SQL
  • Running a program with embedded SQL: OS/400 DDM considerations
  • Running a program with embedded SQL: override considerations
  • Running a program with embedded SQL: SQL return codes
  • Appendix A. Sample Programs Using DB2 UDB for AS/400 Statements

  • Examples of programs that use SQL statements
  • Example: SQL Statements in ILE C and C++ Programs
  • Example: SQL Statements in COBOL and ILE COBOL Programs
  • Example: SQL Statements in PL/I
  • Example: SQL Statements in RPG for AS/400 Programs
  • Example: SQL Statements in ILE RPG for AS/400 Programs
  • Example: SQL Statements in REXX Programs
  • Report produced by sample programs that use SQL
  • Appendix B. DB2 UDB for AS/400 CL Command Descriptions for Host Language Precompilers

  • SQL precompiler commands
  • CRTSQLCBL (Create Structured Query Language COBOL) Command
  • CRTSQLCBLI (Create SQL ILE COBOL Object) Command
  • CRTSQLCI (Create Structured Query Language ILE C Object) Command
  • CRTSQLCPPI (Create Structured Query Language C++ Object) Command
  • CVTSQLCPP (Convert Structured Query Language C++ Source) Command
  • CRTSQLPLI (Create Structured Query Language PL/I) Command
  • CRTSQLRPG (Create Structured Query Language RPG) Command
  • CRTSQLRPGI (Create SQL ILE RPG Object) Command
  • Appendix C. Using the C for AS/400 and FORTRAN for AS/400 Precompilers

  • Using the C for AS/400 Precompiler
  • Access plans in C for AS/400 applications that use SQL
  • Host variable data types in C for AS/400 applications that use SQL
  • Using external file descriptions in C for AS/400 applications that use SQL
  • CRTSQLC (Create Structured Query Language C) Command
  • Using the FORTRAN/400 Precompiler
  • CRTSQLFTN (Create Structured Query Language FORTRAN) Command
  • Appendix D. Coding SQL Statements in FORTRAN Applications

  • Defining the SQL Communications Area in FORTRAN applications
  • Defining SQL Descriptor Areas in FORTRAN applications
  • Embedding SQL Statements in FORTRAN applications
  • Comments in FORTRAN applications that use SQL
  • Debug lines in FORTRAN applications that use SQL
  • Continuation for SQL statements in FORTRAN applications that use SQL
  • Including code in FORTRAN applications that use SQL
  • Margins in FORTRAN applications that use SQL
  • Names in FORTRAN applications that use SQL
  • Statement Labels in FORTRAN applications that use SQL
  • WHENEVER Statement in FORTRAN applications that use SQL
  • FORTRAN Compile-Time Options in the SQL precompiler
  • Using host variables in FORTRAN applications
  • Declaring host variables in FORTRAN applications
  • Determining equivalent SQL and FORTRAN data types
  • Notes on FORTRAN Variable Declaration and Usage
  • Using indicator variables in FORTRAN applications
  • Index


    [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]