Default language.

Xpediter DB2 Stored Procedure (SP) Launch Configurations


To create an Xpediter DB2 Stored Procedure (SP) launch configuration from Xpediter/Eclipse

  1. 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.

    Important

    Alternatively, a launch configuration can be created from Host Explorer or Project Explorer.

  2. In the left pane, select Xpediter DB2 SP Debug Session.
  3. Click icon_add_launch_configuration.gif 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.

    Important

    Alternatively, you can share launch configurations by exporting from one workspace and importing into another workspace.

  4. Enter in the Name field a name for the new configuration. The default name is New_configuration.
  5. 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


Important

  • To use DB2 Stored Procedure debugging with Xpediter/Eclipse, the Xpediter Multi-Batch Facility must be installed and active. Contact your system installer for assistance if needed.
  • An error displays at the top of the Debug Configurations dialog box any time a required field of a launch configuration is not specified or is invalid. A debug session using a configuration with errors cannot be launched.


To create an Xpediter DB2 Stored Procedure (SP) launch configuration from Host Explorer or Project Explorer

  1. 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 https://docs.bmc.com/docs/debug_exc.gif list, select Debug As > Xpediter DB2 SP Debug Session.

      The Select Debug Configuration dialog box appears, showing all previous launch configurations of this type.

      Important

      If there are no previous launch configurations that use this JCL, the Debug Configurations dialog box appears, pre-populated with information for a selected JCL member. The default launch configuration name is <JCL member name>. Skip to step 3.

      If the parse is unsuccessful, the data is not populated.

      The toolbar and right-click functionality available for a configuration is described in the right pane when a configuration type is selected.


  2. 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>.
  3. 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


Important

An error displays at the top of the Debug Configurations dialog box any time a required field of a launch configuration is not specified or is invalid. A debug session using a configuration with errors cannot be launched.


To open an existing launch configuration

  1. 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 debug_exc.gif 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.

    Important

    If there are no previous launch configurations that use this JCL, the Debug Configurations dialog box appears, pre-populated with information for a selected JCL member, so a new launch configuration can be created. Continue the process of creating a new launch configuration by completing the tabs used to define the launch configuration as described above. The default launch configuration name is <JCL member name>.

  2. 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

  1. 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.

      Important

      The five most recently used debug configurations with the same dataset name and host are available from the Debug As submenu.

    • 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.

  2. 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.

Important

  • If Skip All Breakpoints has been selected on the Breakpoints View toolbar, a message appears to give the user an opportunity to change this setting.
  • The user ID and password for a given system are stored in memory for that system as long as Eclipse is running. When Eclipse is closed, user IDs and passwords are released from memory.
  • When a debug session is prepared, the source of the target program displays with the execution pointer stopped at the first line of executable code.

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.

  1. Click icon_debug_view_toolbar_resume.gif. 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.
  2. To terminate the debugging session do either of the following:
    • Click icon_debug_view_toolbar_resume.gif when the maximum number of tests is reached.
    • Click icon_debug_view_toolbar_terminate.gif prior to attaining the specified maximum number of tests.

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.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*