SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)

Contents
HP NonStop SQL/MX Programming Manual for C and COBOL544617-003
ii
1. Introduction (continued)
1. Introduction (continued)
Processing Exception Conditions 1-10
Checking SQLSTATE 1-10
Using WHENEVER 1-10
Using GET DIAGNOSTICS 1-11
Ensuring Data Consistency 1-11
Compiling and Building an Application 1-12
Processing With Embedded Module Definitions 1-12
Processing With Module Definition Files 1-12
General Instructions 1-13
SQL/MX Host Language Preprocessor 1-13
SQL/MX Compiler 1-14
Host Language Compiler 1-14
Program and Module Management 1-14
2. Embedded SQL Statements
Syntax for Coding SQL Statements 2-1
Guidelines for Coding SQL Statements 2-1
Placement of SQL Statements 2-2
MODULE Directive 2-2
Host Variable Declarations 2-2
Nonexecutable SQL Statements 2-4
Executable SQL Statements 2-4
Embedded SQL Declarations and Statements 2-6
Considerations for Embedding DDL and DML Statements 2-12
Considerations for Embedding the UPDATE STATISTICS Statement 2-12
Using CONTROL Statements 2-12
ANSI Compliance and Portability 2-13
Static and Dynamic CONTROL Statements 2-13
CONTROL, Line Order Scope, and Static SQL programs 2-13
CONTROL, Flow Control Scope, and Dynamic SQL programs 2-13
3. Host Variables in C/C++ Programs
Specifying a Declare Section 3-1
C Host Variable Data Types 3-2
Character Host Variables 3-2
Date-Time and Interval Host Variables 3-4
Numeric Host Variables 3-5
Floating-Point Host Variables 3-6