Debug the CICS Application

You can start debugging your CICS application by using the Enterprise Server Dynamic Debugging facility, which enables you to debug a service on a local or remote enterprise server.

Note: When you have finished debugging, you must stop the debugger before you stop the enterprise server. This stops all the active transactions and ensures the enterprise server stops cleanly.

Configure the Enterprise Server for Dynamic Debugging

The IDE includes settings for configuring the Enterprise Server behavior which means you can specify whether to automatically enable dynamic debugging in the enterprise servers associated with projects you are going to debug:

  1. Stop the ACCT enterprise server - in Server Explorer, right-click ACCT in the list of servers, and then click Stop.
  2. In the IDE, click Window > Preferences, expand Micro Focus, and then click Enterprise Server.
  3. Note that all options are set to Prompt
  4. If you do not want to receive notifications, set the following options to Always:
    • Automatically start the associated server
    • Automatically restart the associated server when project output locations change
    • Automatically enable dynamic debugging
  5. Click Apply, and then click OK.

Create a Debug Configuration for Your Project

  1. Click Run > Debug Configurations.
  2. Right-click COBOL Enterprise Server and click New.
  3. Specify ACCT Debug in the Name field.
  4. Click Browse next to the COBOL Project field.
  5. Select the ACCT project and click OK.
  6. In the Enterprise Server section, click Browse, select the ACCT server, then click OK.
  7. In the Debugging type section, on the CICS tab, specify ACCT in the Transaction field.
  8. Click Apply.
  9. Click Debug to start debugging the application.

    As you configured the IDE to start server automatically, this starts the ACCT server and shows a prompt to switch to the Debug perspective.

  10. If you see a Windows Security Alert blocking the Micro Focus Debugger Proxy V2, click Allow access to enable it.
  11. Click Yes when prompted to switch to the Debug perspective.

Debug the ACCT Application

  1. If you closed the Rumba Mainframe Display, to open it - in the Debug view, right-click the COBOL Debugger thread, and click Show Rumba Terminal.

    This opens the Rumba Mainframe Display view within the IDE and loads the CICS application in it.

    Note: If the display does not connect automatically:
    1. Click the New Rumba Mainframe Display button, New Rumba Mainframe Display, in the toolbar of the Rumba Mainframe Display view.
    2. Specify the host name, localhost, and the TN3270 port number, 5239, for the ACCT server.
    3. Click Connect.

      This connects the Rumba Mainframe Display view to the ACCT server and loads the CICS application in it.

  2. Type ACCT in the Rumba Mainframe Display view to execute the CICS application.

    Back in the IDE, the debugger stops the execution of the process and positions the cursor in the Procedure Division of the ACCT00.cbl file.

  3. In Eclipse, step through the CICS application in the usual manner.

Stop Debugging

To stop debugging:

  1. To stop debugging, right-click the session in the Debug pane, and then click Terminate.
  2. Click in the right upper corner of the IDE to switch to the Team Developer perspective.
  3. To stop the server, right-click ACCT in Server Explorer, and click Stop.