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 Solution Explorer, if not already set, set the IMSSupport project as the startup project:
    1. Right-click the IMSSupport project.
    2. Select Set as StartUp Project from the context menu.
  2. Double-click the DEMO001T.cbl file to start the COBOL editor.
  3. 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 Tools > Options, and then expand Text Editor, then click Micro Focus COBOL. In the right frame, check Line numbers, and then 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.
  4. Click File > Save All to save DEMO001T.cbl.

Start debugging

  1. From the main menu, click Debug > Start Debugging.
    • Builds the project.
    • If stopped, starts the IMSDEMO enterprise server region. If prompted, click OK.
    • Starts your terminal emulator.
  2. 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
  3. On the Enterprise Developer toolbar, click Continue Continue.

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

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

  5. In the TABLE-ID field, type TESTDEPT; then press Enter.
  6. On the Visual Studio toolbar, click Continue Continue.

    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.

  7. Tab to the RETURN field.
  8. Type X; then press Enter.
  9. 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 toolbar, click Disconnect , and then close the Rumba+ Desktop.
  2. From the Visual Studio main menu, click DEBUG > Stop Debugging.

This concludes the tutorial.