Debug the ACCT 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.

Set Enterprise Server Debug Options

You can set debug options that turn on some Enterprise Server behaviors automatically such as starting the enterprise server region and dynamic debugging. Before setting these options, you must first stop the :enterprise server region.

  1. To stop the ESACCT enterprise server region, in Server Explorer, right-click ESACCT on the list of servers, and then click Stop.
  2. From the Eclipse menu, click Window > Preferences, expand Micro Focus, and then click Enterprise Server.

    All options are set to Prompt, which means that Eclipse prompts you before executing the option behavior.

  3. To set these options to execute automatically, change the following options to Always:
    • Automatically start the associated server
    • Automatically restart the associated server when project output locations change
    • Automatically enable dynamic debugging
  4. Click OK.

Create a Debug Configuration for Your Project

  1. In Eclipse, click Run > Debug Configurations.
  2. Right-click COBOL Enterprise Server; then select New from the context menu.
  3. In the Name field, type ACCT Debug.
  4. Click Browse next to the COBOL Project field.
  5. Select the ACCT project; then click OK.
  6. In the Debugging type section, on the CICS tab, type ACCT into the Transaction field.
  7. Click Apply.
  8. Click Debug to start debugging the application.
    Note: If the Confirm Perspective Switch dialog box appears, click Yes.

    Based on the debug options set previously, this starts the ESACCT server automatically.

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

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 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 ESACCT server.
    3. Click Connect.

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

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

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

  3. 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. To stop the server, right-click ESACCT in Server Explorer, and click Stop.
Note: It is important for you to stop the debugger before you stop the enterprise server. This stops all the active transactions and ensures the enterprise server stops cleanly.