IBM Embedded SQL programming
のためのマニュアルとユーザーガイド IBM Embedded SQL programming. 見つかりました 1 無料ダウンロード用マニュアル User manual
Below you will find brief information for Database Embedded SQL programming. This document explains how to create database applications in host languages that use DB2 for IBM i SQL statements and functions.
主な特徴
Use host variables in SQL statements
Handle SQL error return codes using the SQLCA
Use the SQL diagnostics area
Code SQL statements in C and C++ applications
Code SQL statements in COBOL applications
Code SQL statements in PL/I applications
Code SQL statements in RPG/400 applications
Code SQL statements in ILE RPG applications
Code SQL statements in REXX applications
Prepare and run a program with SQL statements
ページ: 204 IBM Embedded SQL programming User manual
ブランド: IBM カテゴリー: Development software サイズ: 2 MB
言語: English
目次
- 5 Contents
- 9 Embedded SQL programming
- 9 What's new for IBM i 7.2
- 9 PDF file for Embedded SQL programming
- 10 Common concepts and rules for using embedded SQL
- 10 Writing applications that use SQL
- 10 Using host variables in SQL statements
- 12 Assignment rules for host variables in SQL statements
- 12 Indicator variables in applications that use SQL
- 13 Indicator variables used with host structures
- 13 Indicator variables used to assign special values
- 14 Handling SQL error return codes using the SQLCA
- 15 Using the SQL diagnostics area
- 16 Updating applications to use the SQL diagnostics area
- 16 IBM i programming model
- 16 Additional notes on using the SQL diagnostics area
- 16 Example: SQL routine exception
- 17 Example: Logging items from the SQL diagnostics area
- 18 Handling exception conditions with the WHENEVER statement
- 19 Coding SQL statements in C and C++ applications
- 19 Defining the SQL communication area in C and C++ applications that use SQL
- 21 Defining SQL descriptor areas in C and C++ applications that use SQL
- 23 Embedding SQL statements in C and C++ applications that use SQL
- 23 Comments in C and C++ applications that use SQL
- 23 Continuation for SQL statements in C and C++ applications that use SQL
- 23 Including code in C and C++ applications that use SQL
- 24 Margins in C and C++ applications that use SQL
- 24 Names in C and C++ applications that use SQL
- 24 NULLs and NULs in C and C++ applications that use SQL
- 24 Statement labels in C and C++ applications that use SQL
- 24 Preprocessor sequence for C and C++ applications that use SQL
- 24 Trigraphs in C and C++ applications that use SQL
- 25 WHENEVER statement in C and C++ applications that use SQL
- 25 Using host variables in C and C++ applications that use SQL
- 25 Declaring host variables in C and C++ applications that use SQL
- 25 Numeric host variables in C and C++ applications that use SQL
- 26 Character host variables in C and C++ applications that use SQL
- 29 Graphic host variables in C and C++ applications that use SQL
- 31 Binary host variables in C and C++ applications that use SQL
- 32 LOB host variables in C and C++ applications that use SQL
- 35 XML host variables in C and C++ applications that use SQL
- 37 ROWID host variables in C and C++ applications that use SQL
- 38 Result set locator host variables in C and C++ applications that use SQL
- 38 Using host structures in C and C++ applications that use SQL
- 39 Host structure declarations in C and C++ applications that use SQL
- 42 Host structure indicator array in C and C++ applications that use SQL
- 42 Using arrays of host structures in C and C++ applications that use SQL
- 43 Host structure array in C and C++ applications that use SQL
- 46 Host structure array indicator structure in C and C++ applications that use SQL
- 46 Using pointer data types in C and C++ applications that use SQL
- 47 Using typedef in C and C++ applications that use SQL
- 48 Using ILE C compiler external file descriptions in C and C++ applications that use SQL
- 48 Determining equivalent SQL and C or C++ data types
- 51 Notes on C and C++ variable declaration and usage
- 51 Using indicator variables in C and C++ applications that use SQL
- 52 Coding SQL statements in COBOL applications
- 52 Defining the SQL communication area in COBOL applications that use SQL
- 53 Defining SQL descriptor areas in COBOL applications that use SQL
- 55 Embedding SQL statements in COBOL applications that use SQL
- 55 Comments in COBOL applications that use SQL
- 55 Continuation for SQL statements in COBOL applications that use SQL
- 56 Including code in COBOL applications that use SQL
- 56 Margins in COBOL applications that use SQL
- 56 Sequence numbers in COBOL applications that use SQL
- 56 Names in COBOL applications that use SQL
- 56 COBOL compile-time options in COBOL applications that use SQL
- 56 Statement labels in COBOL applications that use SQL
- 56 WHENEVER statement in COBOL applications that use SQL
- 56 Multiple source COBOL programs and the SQL COBOL precompiler
- 56 Using host variables in COBOL applications that use SQL
- 57 Declaring host variables in COBOL applications that use SQL
- 57 Numeric host variables in COBOL applications that use SQL
- 58 Floating-point host variables in COBOL applications that use SQL
- 59 Character host variables in COBOL applications that use SQL
- 60 Graphic host variables in COBOL applications that use SQL
- 62 Binary host variables in COBOL applications that use SQL
- 62 LOB host variables in COBOL applications that use SQL
- 64 XML host variables in COBOL applications that use SQL
- 66 Datetime host variables in COBOL applications that use SQL
- 66 ROWID host variables in COBOL applications that use SQL
- 67 Result set locator host variables in COBOL applications that use SQL
- 67 Using host structures in COBOL applications that use SQL
- 68 Host structure in COBOL applications that use SQL
- 71 Host structure indicator array in COBOL applications that use SQL
- 72 Using host structure arrays in COBOL applications that use SQL
- 73 Host structure array in COBOL applications that use SQL
- 76 Host array indicator structure in COBOL applications that use SQL
- 77 Using external file descriptions in COBOL applications that use SQL
- 77 Using external file descriptions for host structure arrays in COBOL applications that use SQL
- 78 Determining equivalent SQL and COBOL data types
- 80 Notes on COBOL variable declaration and usage
- 81 Using indicator variables in COBOL applications that use SQL
- 81 Coding SQL statements in PL/I applications
- 82 Defining the SQL communication area in PL/I applications that use SQL
- 82 Defining SQL descriptor areas in PL/I applications that use SQL
- 83 Embedding SQL statements in PL/I applications that use SQL
- 83 Example: Embedding SQL statements in PL/I applications that use SQL
- 84 Comments in PL/I applications that use SQL
- 84 Continuation for SQL statements in PL/I applications that use SQL
- 84 Including code in PL/I applications that use SQL
- 84 Margins in PL/I applications that use SQL
- 84 Names in PL/I applications that use SQL
- 84 Statement labels in PL/I applications that use SQL
- 84 WHENEVER statement in PL/I applications that use SQL
- 84 Using host variables in PL/I applications that use SQL
- 85 Declaring host variables in PL/I applications that use SQL
- 85 Numeric-host variables in PL/I applications that use SQL
- 86 Character-host variables in PL/I applications that use SQL
- 86 Binary host variables in PL/I applications that use SQL
- 87 LOB host variables in PL/I applications that use SQL
- 88 ROWID host variables in PL/I applications that use SQL
- 89 Using host structures in PL/I applications that use SQL
- 89 Host structures in PL/I applications that use SQL
- 90 Host structure indicator arrays in PL/I applications that use SQL
- 91 Using host structure arrays in PL/I applications that use SQL
- 91 Host structure array in PL/I applications that use SQL
- 92 Host structure array indicator in PL/I applications that use SQL
- 92 Using external file descriptions in PL/I applications that use SQL
- 93 Determining equivalent SQL and PL/I data types
- 95 Using indicator variables in PL/I applications that use SQL
- 96 Differences in PL/I because of structure parameter passing techniques
- 96 Coding SQL statements in RPG/400 applications
- 96 Defining the SQL communication area in RPG/400 applications that use SQL
- 97 Defining SQL descriptor areas in RPG/400 applications that use SQL
- 98 Embedding SQL statements in RPG/400 applications that use SQL
- 98 Example: Embedding SQL statements in RPG/400 applications that use SQL
- 98 Comments in RPG/400 applications that use SQL
- 98 Continuation for SQL statements in RPG/400 applications that use SQL
- 98 Including code in RPG/400 applications that use SQL
- 99 Sequence numbers in RPG/400 applications that use SQL
- 99 Names in RPG/400 applications that use SQL
- 99 Statement labels in RPG/400 applications that use SQL
- 99 WHENEVER statement in RPG/400 applications that use SQL
- 99 Using host variables in RPG/400 applications that use SQL
- 99 Declaring host variables in RPG/400 applications that use SQL
- 100 Using host structures in RPG/400 applications that use SQL
- 100 Using host structure arrays in RPG/400 applications that use SQL
- 101 Using external file descriptions in RPG/400 applications that use SQL
- 102 External file description considerations for host structure arrays in RPG/400 applications that use SQL
- 102 Determining equivalent SQL and RPG/400 data types
- 105 Assignment rules in RPG/400 applications that use SQL
- 105 Using indicator variables in RPG/400 applications that use SQL
- 105 Example: Using indicator variables in RPG/400 applications that use SQL
- 106 Differences in RPG/400 because of structure parameter passing techniques
- 106 Correctly ending a called RPG/400 program that uses SQL
- 106 Coding SQL statements in ILE RPG applications
- 107 Defining the SQL communication area in ILE RPG applications that use SQL
- 108 Defining SQL descriptor areas in ILE RPG applications that use SQL
- 109 Embedding SQL statements in ILE RPG applications that use SQL
- 110 Comments in ILE RPG applications that use SQL
- 110 Continuation for SQL statements in ILE RPG applications that use SQL
- 111 Including code in ILE RPG applications that use SQL
- 111 Using directives in ILE RPG applications that use SQL
- 111 Sequence numbers in ILE RPG applications that use SQL
- 111 Names in ILE RPG applications that use SQL
- 112 Statement labels in ILE RPG applications that use SQL
- 112 WHENEVER statement in ILE RPG applications that use SQL
- 112 Using host variables in ILE RPG applications that use SQL
- 112 Declaring host variables in ILE RPG applications that use SQL
- 113 Declaring binary host variables in ILE RPG applications that use SQL
- 114 Declaring LOB host variables in ILE RPG applications that use SQL
- 114 LOB host variables in ILE RPG applications that use SQL
- 115 LOB locators in ILE RPG applications that use SQL
- 116 LOB file reference variables in ILE RPG applications that use SQL
- 117 Declaring XML host variables in ILE RPG applications that use SQL
- 119 Declaring ROWID variables in ILE RPG applications that use SQL
- 120 Declaring result set locator variables in ILE RPG applications that use SQL
- 120 Using host structures in ILE RPG applications that use SQL
- 122 Using host structure arrays in ILE RPG applications that use SQL
- 123 Using external file descriptions in ILE RPG applications that use SQL
- 124 External file description considerations for host structure arrays in ILE RPG applications that use SQL
- 125 Determining equivalent SQL and ILE RPG data types
- 133 Notes on ILE RPG variable declaration and usage
- 133 Using indicator variables in ILE RPG applications that use SQL
- 134 Example: Using indicator variables in ILE RPG applications that use SQL
- 134 Example: SQLDA for a multiple row-area fetch in ILE RPG applications that use SQL
- 135 Example: Dynamic SQL in an ILE RPG application that uses SQL
- 136 Coding SQL statements in REXX applications
- 136 Using the SQL communication area in REXX applications
- 137 Using SQL descriptor areas in REXX applications
- 139 Embedding SQL statements in REXX applications
- 140 Comments in REXX applications that use SQL
- 141 Continuation of SQL statements in REXX applications that use SQL
- 141 Including code in REXX applications that use SQL
- 141 Margins in REXX applications that use SQL
- 141 Names in REXX applications that use SQL
- 141 Nulls in REXX applications that use SQL
- 141 Statement labels in REXX applications that use SQL
- 141 Handling errors and warnings in REXX applications that use SQL
- 141 Using host variables in REXX applications that use SQL
- 142 Determining data types of input host variables in REXX applications that use SQL
- 143 The format of output host variables in REXX applications that use SQL
- 144 Avoiding REXX conversion in REXX applications that use SQL
- 144 Using indicator variables in REXX applications that use SQL
- 144 Preparing and running a program with SQL statements
- 144 Basic processes of the SQL precompiler
- 145 Input to the SQL precompiler
- 146 Source file CCSIDs in the SQL precompiler
- 146 Output from the SQL precompiler
- 146 Listing
- 147 Temporary source file members created by the SQL precompiler
- 147 Sample SQL precompiler output
- 151 Non-ILE SQL precompiler commands
- 152 Compiling a non-ILE application program that uses SQL
- 152 ILE SQL precompiler commands
- 153 Compiling an ILE application program that uses SQL
- 154 Setting compiler options using the precompiler commands
- 154 Interpreting compile errors in applications that use SQL
- 155 Binding an application that uses SQL
- 155 Program references in applications that use SQL
- 156 Displaying SQL precompiler options
- 156 Running a program with embedded SQL
- 156 Running a program with embedded SQL: DDM considerations
- 156 Running a program with embedded SQL: Override considerations
- 157 Running a program with embedded SQL: SQL return codes
- 157 Example programs: Using DB2 for i statements
- 159 Example: SQL statements in ILE C and C++ programs
- 165 Example: SQL statements in COBOL and ILE COBOL programs
- 174 Example: SQL statements in PL/I programs
- 179 Example: SQL statements in RPG/400 programs
- 185 Example: SQL statements in ILE RPG programs
- 191 Example: SQL statements in REXX programs
- 195 Report produced by example programs that use SQL
- 196 CL command descriptions for host language precompilers
- 196 Create SQL COBOL Program command
- 197 Create SQL ILE COBOL Object command
- 197 Create SQL ILE C Object command
- 197 Create SQL ILE C++ Object command
- 197 Create SQL PL/I Program command
- 197 Create SQL RPG Program command
- 197 Create SQL ILE RPG Object command
- 197 Related information for Embedded SQL programming
- 199 Notices
- 201 Programming interface information
- 201 Trademarks
- 201 Terms and conditions
よくある質問と回答
What is a host variable?
A host variable is a field in your program that is specified in an SQL statement, usually as the source or target for the value of a column.
What is an indicator variable?
An indicator variable is a halfword integer variable used to communicate additional information about its associated host variable.
How do I handle SQL error return codes?
When an SQL statement is processed in your program, SQL places a return code in the SQLCODE and SQLSTATE fields.
How do I use the SQL diagnostics area?
The SQL diagnostics area is used to keep the returned information for an SQL statement that has been run in a program.
広告