You can work with the original SQL source in debug mode instead of the complex C-generated code. There are two ways to generate the SQL SOURCE view.:
With the *SOURCE debug view specified, DB2 UDB creates an extra SQL source-level debug view as it generates the C program. A source file member is generated to store the SQL source. Depending on how you specify the procedure name in the CREATE PROCEDURE statement, the debug view is created into a different library. If the procedure is qualified with a schema or library name, then the debug view is created in the same library as the generated C program object. Otherwise, the debug view is stored in the QTEMP library. This means that only the job that creates the SQL procedure, function, or trigger will be able to use the *SOURCE debug view.