Debugging Db2 programs
While you debug a program containing SQL statements, remember the following behaviors:
- The SQL preprocessor replaces all the SQL statements in the program with host language code. The modified source output from the preprocessor contains the original SQL statements in comment form. For this reason, the source or listing view displayed during a debugging session can look very different from the original source.
- The host language code inserted by the SQL preprocessor starts the SQL access module for your program. You can halt program execution at each call to a SQL module and immediately following each call to a SQL module, but the called modules cannot be debugged.
- A host language SQL coprocessor performs Db2® precompiler functions at compile time and replaces the SQL statements in the program with host language code. However, the generated host language code is not displayed during a debug session; the original source code is displayed.
The topics below describe the steps you need to follow to use z/OS® Debugger to debug your Db2 programs.
- Preparing a Db2 program
- Processing SQL statements
- Linking Db2 programs for debugging
- Binding Db2 programs for debugging
- Debugging Db2 programs in batch mode
- Debugging Db2 programs in full-screen mode
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- Preparing a Db2 program
- DB2® UDB for z/OS Application Programming and SQL Guide