When debugging stored procedures, you might need to use
different techniques than you would use for regular application programs.
For example, some commonly used debugging tools, such as TSO TEST,
are not available in the environment where stored procedures run.
Procedure
To debug a stored procedure, perform one or more of the
following actions:
- Take one or more of the following general actions, which
are appropriate in many situations with stored procedures:
- If your stored procedures address space has the CEEDUMP
data set allocated, look at the diagnostic information in the CEEDUMP
output.
- For COBOL, C, and C++ stored procedures, use the Debug
Tool for z/OS.
- For COBOL stored procedures, compile the stored
procedure with the option TEST(SYM) if you want a formatted local
variable dump to be included in the CEEDUMP output.
- For native SQL procedures, external SQL procedures, and Java stored procedures, use the
Unified Debugger.
- For external stored procedures, consider taking one or
both of the following actions:
- Use a driver application.
- Create or alter the stored procedure definition to include
the PARAMETER STYLE SQL option. This option enables the stored procedure
to share any error information with the calling application. Ensure
that your procedure follows linkage conventions for stored procedures.
- If you changed a stored procedure or a startup JCL procedure
for a WLM application environment, determine whether you need to refresh
the WLM environment. You must refresh the WLM environment before certain
stored procedure changes take effect.