Xpediter DB2 Stored Procedure (SP) Launch Configurations
To create an Xpediter DB2 Stored Procedure (SP) launch configuration from Xpediter/Eclipse
From the Run menu, select Debug Configurations. The Debug Configurations dialog box appears. This dialog box contains a tree view of configuration types (such as Xpediter Batch Debug Session) and their corresponding configurations.
- In the left pane, select Xpediter DB2 SP Debug Session.
Click
or right-click the node and select New. A child node representing the newly created configuration is added to the Xpediter DB2 SP Debug Session root node.
- Enter in the Name field a name for the new configuration. The default name is New_configuration.
- Complete the tabs beneath the Name field, which are used to define the launch configuration:
- Target
- Visualization (Optional) (Used to request visualization of program and I/O calls in the Runtime Visualizer perspective. For more information refer to the Topaz-Workbench-Program-Analysis-and-Runtime-Visualizer-User-Guide.)
- Code Coverage (Optional)
- Scripting (Optional)
- Load Libraries (Optional)
- DDIO (Optional)
- Log (Optional)
- Work Files (Optional)
- Common tab
To create an Xpediter DB2 Stored Procedure (SP) launch configuration from Host Explorer or Project Explorer
Do any of the following:
- Right-click a JCL member in Project Explorer and select Debug As > Xpediter DB2 SP Debug Session.
- Right-click a JCL member in the Host Explorer navigation tree and select Debug As > Xpediter DB2 SP Debug Session.
- Right-click a JCL member in the Host Explorer Contents view and select Debug As > Xpediter DB2 SP Debug Session.
- With the JCL member open in an editor, right-click and select Debug As > Xpediter DB2 SP Debug Session.
- Select a JCL member and, from the Run menu, select Debug As > Xpediter DB2 SP Debug Session.
Select a JCL member and, from the
list, select Debug As > Xpediter DB2 SP Debug Session.
The Select Debug Configuration dialog box appears, showing all previous launch configurations of this type.
- Select Create a new configuration and click Open. The Debug Configurations dialog box appears, pre-populated with information for a selected JCL member. The default launch configuration name is <JCL member name>.
- Complete any additional information on the tabs beneath the Name field, which are used to define the launch configuration:
- Target
- Visualization (Optional) (Used to request visualization of program and I/O calls in the Runtime Visualizer perspective. For more information refer to the Topaz-Workbench-Program-Analysis-and-Runtime-Visualizer-User-Guide.)
- Code Coverage (Optional)
- Scripting (Optional)
- Load Libraries (Optional)
- DDIO (Optional)
- Log (Optional)
- Work Files (Optional)
- Common tab
To open an existing launch configuration
In Host Explorer, do any of the following:
- Right-click a JCL member in Project Explorer and select Debug As > Xpediter DB2 SP Debug Session.
- Right-click a JCL member in the Host Explorer navigation tree and select Debug As > Xpediter DB2 SP Debug Session.
- Right-click a JCL member in the Host Explorer Contents view and select Debug As > Xpediter DB2 SP Debug Session.
- With the JCL member open in an editor, right-click and select Debug As > Xpediter DB2 SP Debug Session.
- Select a JCL member and, from the Run menu, select Debug As > Xpediter DB2 SP Debug Session.
- Select a JCL member and, from the
list, select Debug As > Xpediter DB2 SP Debug Session.
The Select Debug Configuration dialog box appears, showing all existing launch configurations of this type that use the selected JCL member.
- Select Use an existing configuration, select the launch configuration from the list, and click Open. The Debug Configurations dialog box appears.
Alternatively, prior launched debug sessions that use a particular configuration can be re-launched using the list menu of the Debug toolbar button on the Xpediter or Host Explorer perspective and selecting the configuration.
To launch a debug session
- Do one of the following:
- Right-click a JCL member in Project Explorer and select Debug As and select the desired debug configuration.
Right-click a JCL member in the Host Explorer navigation tree and select Debug As and select the desired debug configuration.
- Right-click a JCL member in the Host Explorer navigation tree and select Debug As>Xpediter DB2 SP Debug Session. The Select Debug Configuration dialog box appears, showing all previous launch configurations of this type that use the JCL member. Select the debug configuration to be run and click Debug.
From the Run menu, select Debug Configurations. The Debug Configurations dialog box appears. Select an Xpediter DB2 SP debug session configuration to use for the debug session. Click Debug.
After the WorkLoad Manager (WLM) JCL is submitted, the message Waiting for Xpediter debug session… displays in the Console view indicating that Xpediter is waiting for the DB2 stored procedure to execute.
- Submit the job that will execute the caller of the DB2 stored procedure. This will start the stored procedure in the WLM so that Xpediter can then intercept it. When the DB2 stored procedure specified in the launch configuration is executed and intercepted by Xpediter, the source for the program displays with the execution pointer stopped at the first executable line of code. Refer to the Topaz-Workbench-Host-Explorer-User-Guide for information on how to submit a job.
Views in a DB2 Stored Procedure session
- The Console view shows the current status of the debug session. For instance, messages display when attempting to connect to the mainframe, upon connection, and when the job specified in the debug launch configuration is submitted.
- The Debug view provides information about the debug session as well as controls for forwarding progress of the debug session.
- The Memory view displays the values in memory and allows users to edit them during a debug session.
- The Open DDIO view allows users to browse source listing files and set breakpoints during a debug session.
- The Variables view allows users to view and edit variable names, types, and values during a debug session.
To run the DB2 Stored Procedure multiple times
Xpediter/Eclipse DB2 stored procedure support allows the DB2 stored procedure specified on the launch configuration to be intercepted as many times as specified in the Maximum Number of Tests field on the Target tab of the launch configuration. Xpediter/Eclipse stops automatically at the return point of the program.
- Click
. Xpediter/Eclipse DB2 stored procedure support waits for the DB2 stored procedure to re-execute. When the DB2 stored procedure re-executes, it is intercepted until the maximum number of tests is reached.
- To terminate the debugging session do either of the following:
- Click
when the maximum number of tests is reached.
- Click
prior to attaining the specified maximum number of tests.
- Click
At this point, the debugging session terminates, the Xpediter/TSO log optionally displays (if enabled on the launch configuration Log tab), and the DB2 WLM batch address space terminates.
Displaying the Xpediter Log
The Log tab in a DB2 SP Launch Configuration contains an option to display the log at the end of each debug session. When this option is enabled, the log appears when the debug session terminates and the Console tab displays a message signaling the end of your session.