Launching a debug session for z/OS batch applications using existing JCL

You can create a z/OS Batch Application using existing JCL launch configuration to augment existing JCL with appropriate options and submit JCL to run z/OS batch applications. This launch configuration supports using a debug profile.

About this task

Creating a z/OS Batch Application using existing JCL launch configuration

About this task

You can create a z/OS Batch Application using existing JCL launch configuration from the Debug perspective or from the Debug As context menu for JCL items in the Remote Systems view, the z/OS Projects view, or when you are editing JCL.

Procedure

  1. From the main toolbar, click the down arrow to the right of the debug icon (Debug icon) and select Debug Configurations.
    The Debug Configurations wizard opens.
  2. In the wizard, from the list on the left, right-click z/OS Batch Application using existing JCL and select New.
    The z/OS Batch Application using existing JCL launch configuration wizard opens.
  3. In the Name field, enter a name for the new launch configuration.
  4. On the JCL Options tab, specify JCL generation options and optionally a non-CICS profile to activate as part of the launch.
  5. Complete the required fields and any other optional fields in the wizard.
    For more information about the fields, see the topics about the tabs.
  6. Click Apply.
    The new configuration is saved on the client. When you click Debug, the remote debug profile is activated. Then, JCL is generated and submitted to start your debug session.

Using the launch configuration in code coverage mode

About this task

You can create a z/OS Batch Application using existing JCL launch configuration from the Debug perspective or from the Code Coverage As context menu for JCL items in the Remote Systems view, the z/OS Projects view, or when you are editing JCL.

Procedure

  1. From the main toolbar, click the down arrow to the right of the Compiled Code Coverage icon (Compiled Code Coverage icon) and select Compiled Code Coverage Configurations.
    The Compiled Code Coverage Configurations wizard opens.
  2. On the Code Coverage tab, specify any code coverage options.
  3. Complete other fields in the wizard as necessary.
    For more information about the fields, see the topics about the tabs.
  4. Click the Coverage button. If a non-CICS profile is specified, the profile is activated. Then, JCL is generated and submitted to start your compiled code coverage session.

Using the launch configuration from the Remote Systems or z/OS Projects view or Eclipse Project Explorer view

Procedure

  1. In the view, right-click the JCL source in the tree.
  2. From the menu, select Debug As to debug or select Code Coverage As to run code coverage.
  3. Select any of the following options:
    • z/OS Batch Application: Launch a debug or code coverage session without a debug profile. If more than one step exists in the JCL and no launch configuration matches your JCL, you are prompted to specify at least one step. Additionally, if the JCL is in a local project in the z/OS Projects view, or in a project visible in the Eclipse Projects Explorer view, you will need to specify the appropriate connection for the launch.
    • z/OS Batch Application with a debug profile: Launch a debug or code coverage session with a debug profile. This option is visible when non-CICS profiles are defined for the z/OS connection that is used to access the JCL. If there is more than one step in the JCL or more than one non-CICS profile, and no launch configuration matches your JCL, you are prompted to specify at least one step and a profile. Additionally, if the JCL is in a local project in the z/OS Projects view, or in a project visible in the Eclipse Projects Explorer view, you will need to specify the appropriate connection for the launch.
    Note: The z/OS Projects view is only available with IDz.

Using the launch configuration when you are editing

Procedure

  1. When you are editing the JCL source, right-click in the editor.
  2. From the menu, select Debug As to debug or select Code Coverage As to run code coverage.
  3. Select any of the following options:
    • z/OS Batch Application: Launch a debug or code coverage session without a debug profile. If more than one step exists in the JCL and no launch configuration matches your JCL, you are prompted to specify at least one step. Additionally, if the JCL is in a local project in the z/OS Projects view, or in a project visible in the Eclipse Projects Explorer view, you will need to specify the appropriate connection for the launch.
    • z/OS Batch Application with a debug profile: Launch a debug or code coverage session with a debug profile. This option is visible when non-CICS profiles are defined for the z/OS connection that is used to access the JCL. If there is more than one step in the JCL or more than one non-CICS profile, and no launch configuration matches your JCL, you are prompted to specify at least one step and a profile. Additionally, if the JCL is in a local project in the z/OS Projects view, or in a project visible in the Eclipse Projects Explorer view, you will need to specify the appropriate connection for the launch.

Viewing the batch job in the Remote Systems view

About this task

After you launch a debug or code coverage session, the existing JCL used to generate new JCL statements is augmented with debug options and submitted automatically. In the Debug view, a debug target that represents the JES job is displayed with a label indicating the job status. You can use this JES job target to quickly access the job in the Remote Systems View.

Procedure

  1. In the Debug view, select the JES job target, which is the first child of the launch, and right-click to open the context menu.
  2. From the menu, select Show In Remote Systems.
    The Remote Systems view is opened and the job is selected under the Retrieved Jobs filter in the JES subsystem.