This is the process for debugging a stored procedure.
To
debug a stored procedure, it must be built with specific compiler
and runtime options. A compiler listing is also required for COBOL
stored procedures.
Remove the stored procedure from the remote
system as described in Removing a stored
procedure.
Specify a compiler listing data set as described
in Setting up the z/OS® build properties if you want to
debug a COBOL stored procedure that has not been specified yet.
- Click the Options tab in the Editor view and select the
"Build Stored Procedure for Debugging" check box.
- Store the changes by pressing Ctrl+S on
your keyboard.
- The generated runtime options from the Options page are
propagated to the DDL page.
- Click the Deploy tab in the Editor view and enter “TEST”
in the Compile options field.
- Store the changes by pressing Ctrl+S on
your keyboard.
- Build the stored procedure as described in the section Building a stored procedure.
- Run the stored procedure as described in the section Running a stored procedure. The
Debugging perspective opens automatically when the stored procedure
has been invoked.
- Click OK if the following message
appears:
- EQA2383I The environment is not yet fully initialized. Use Step
or Run.
- Breakpoints can be set by double clicking the gray vertical
bar on the right side of the Source view.
- Click the Resume button on the window
bar of the Debug view to run from one breakpoint to the next.
- Click the Step Into button on the
window bar of the Debug view to step from one statement to the next.
- The values of the variables are displayed in the Variables
view of the Debug perspective. You can change the values by double
clicking on the variable. Then type the new value for the variable
and click OK.
- Click OK if the following exception
occurs when debugging a PL/I stored procedure:
- The following exception has occurred: IBM0368W The FINISH condition
was raised due to a RETURN or END statement in the main procedure.
- Click OK when the Debugger Message
window says the “Application has Terminated.”
- Click the Data Perspective button
to switch back to the Data Perspective.