Debug the CICS Project

Shows how to use the debugger to walk through an employee directory PL/I sample application. It explains pertinent parts of the application and debugger functionality.

Debug the STAFF application

  1. On the Solution Explorer, select the CICS project.
  2. From the main menu in Visual Studio, select Debug > Start Debugging.

    This automatically builds the solution, and loads CICS into the HACloud Mainframe TN3270 Display. You can view the progress of this process in the Output window.

  3. To log in, type SYSAD into both the USERID and Password fields.
    Tip: Press the Tab key to move from the USERID field to the Password field.
  4. Press Enter.
  5. Press Ctrl+F2 to clear the screen
  6. Type TTEA and press Enter to start the sample application.

    In Visual Studio, the debugger stops the execution of the process and positions the cursor in the STAFF02 program file.

  7. Click Continue.

    This opens the main screen in your TN3270 display.

  8. Type SMITH in the Name field and press Enter.
  9. In Visual Studio, click Continue.

    Program execution stops on your first breakpoint:

    EXEC CICS RECEIVE MAPSET('OCMCS')

    This line indicates that the program receives data from the CICS OCMCS BMS mapset, which is part of the project.

  10. Press F10 (Step Over).

    The debugger steps to this line:

    IF RC ^= DFHRESP(NORMAL) THEN
  11. Hover over the RC field to view its contents.
  12. Press F10 two more times to step to the line that reads:
    IF NAMEDI = (45) '00'x THEN
  13. Right-click the text NAMEDI and choose QuickWatch to see data for the NAMEDI expression..
  14. Click Close to close the QuickWatch dialog box.
  15. Click Continue.

    Program execution stops on your next breakpoint:

    EXEC CICS WRITEQ

    This line writes the processed input data (SMITH) to CICS temporary storage.

  16. Click Continue.

    Program execution stops on your final breakpoint:

    EXEC CICS XCTL PROGRAM ('STAFF03')

    This line calls the program STAFF03.

  17. Press F11 (Step Into) to step into STAFF03.

    This opens the STAFF03 program in the debugger, and the Staff Directory screen in your TN3270 display.

  18. Click Debug > Stop Debugging.

Stop the STAFF enterprise server instance

  1. On the Server Explorer, right-click the STAFF server, and then select Stop from the context menu.

This concludes the tutorial.