SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)
Contents
HP NonStop SQL/MX Programming Manual for C and COBOL—544617-003
ix
13. Exception Handling and Error
Conditions (continued)
13. Exception Handling and Error Conditions (continued)
Using the WHENEVER Statement 13-8
Precedence of Multiple WHENEVER Declarations 13-9
Determining the Scope of a WHENEVER Declaration 13-9
Enabling and Disabling the WHENEVER Declaration 13-10
Saving and Restoring SQLSTATE or SQLCODE 13-10
Declaring SQLSTATE or SQLCODE in an Error Routine 13-12
Accessing and Using the Diagnostics Area 13-13
Using the GET DIAGNOSTICS Statement 13-13
Getting Statement and Condition Items 13-14
Special SQL/MX Error Conditions 13-15
Lost Open Error (8574) 13-15
Occurrences of the Lost Open Error 13-16
Recovering From the Lost Open Error 13-16
14. Transaction Management
Transaction Control Statements 14-1
Steps for Ensuring Data Consistency 14-1
Declaring Required Variables 14-3
Setting Attributes for Transactions 14-3
Starting a Transaction 14-6
Processing Database Changes 14-7
Testing for Errors 14-7
Committing Database Changes if No Errors Occur 14-8
Undoing Database Changes if an Error Occurs 14-8
15. C/C++ Program Compilation
Compiling SQL/MX Applications and Modules 15-2
Compiling Embedded SQL C/C++ Programs With Embedded Module
Definitions 15-2
Compiling Embedded SQL C/C++ Programs With Module Definition Files 15-6
Creating Modules: From Development to Production 15-8
Running the SQL/MX C/C++ Preprocessor 15-8
Preprocessor Functions 15-9
Preprocessor Output 15-14
OSS-Hosted SQL/MX C/C++ Preprocessor 15-16
Windows-Hosted SQL/MX C/C++ Preprocessor 15-21
Running the C/C++ Compiler and Linker 15-28
Running the SQL/MX Compiler 15-30










