Debug MFDEMO

Walks you through the process of debugging the MFDEMO application in Enterprise Developer using the embedded Rumba+ Desktop 3270 emulator.

Debugging requires that your project is associated with the IMSDEMO enterprise server and that IMSDEMO is configured to use dynamic debugging. Both of these requirements were met earlier in this tutorial.

Set a breakpoint

  1. In the Application Explorer view, expand the IMSSupport project; then double-click DEMO001T.cbl to start the COBOL editor.
  2. Scroll down to line number 543 and set a breakpoint. The code on line 543 is:
     IF DEMO91-FUNCTION = 'I' OR 'i'
    Notes:
    • To enable line numbers in the editor, click Window > Preferences, expand General > Editors. On the Text Editors page, check Show line numbers and click OK.
    • To set a breakpoint, on the line of code where you want to break, put your cursor in the far left column and double-click.

Create a Debug Launch Configuration

  1. In the Application Explorer view, click the IMSSupport project to select it.
  2. From the main menu, click Run > Debug Configurations.
  3. On the tree view, click COBOL Application.
  4. On the Debug Configurations toolbar, click New launch configuration New launch configuration.
  5. In the Name field, type COBOL_IMS_Tutorial.
  6. On the General tab, expand Main Program.
  7. If checked, uncheck Program is part of project build configuration.
  8. Click the Browse button under Main Program.
  9. Browse to and select the DEMO001T.dll file located in your project's loadlib folder.
  10. Click Apply and then Close to apply changes and close the Debug Configurations dialog box.

Start debugging

  1. From the Eclipse menu, click Run > Debug As > IMS on COBOL Enterprise Server.
    • Builds the project.
    • If stopped, starts the IMSDEMO enterprise server region. If prompted, click OK.
    • Opens the debugger.
  2. In Server Explorer, right-click IMSDEMO; then select Show TN3270 Display.
    Note: If the Rumba+ Desktop Mainframe Display view does not connect automatically, click Connect icon(Connect) in the Rumba Mainframe Display view.
  3. In the terminal emulator, log into IMS and start MFDEMO just as you did to run the MFDEMO application as described in the previous topic.

    In Enterprise Developer, the debugger shows the current line of code execution:


    IMS Debug
  4. On the Enterprise Developer toolbar, click Resume Resume.

    This transfers control back to the terminal emulator and advances the application to its main menu.

  5. On the main menu in the terminal emulator, type I into the FUNCTION CODE field to select the <I>NQUIRE function.

    This action advances your cursor to the TABLE-ID field.

  6. In the TABLE-ID field, type TESTDEPT; then press Enter.
  7. On the Eclipse toolbar, click Resume Resume.

    The debugger advances to your breakpoint, and the terminal display shows the INQUIRY screen. From here you can continue debugging if desired. When you have finished, continue with the next step from whatever screen you are on.

  8. Tab to the RETURN field.
  9. Type X; then press Enter.
  10. On the main menu, type E into the FUNCTION CODE field; then press Enter.

    This action takes you to the TRANCODE - MFDEMO - ENDED screen.

Stop debugging

  1. From the Rumba+ Desktop Mainframe TN3270 Display toolbar, click Disconnect Mainframe TN3270 Display icon, and then close the Rumba+ Desktop.
  2. On the Eclipse toolbar, click Terminate Terminate.

This concludes the tutorial.