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
- On the
Solution Explorer, select the
CICS project.
- From the main menu in Visual Studio, select
Debug > Start Debugging.
This automatically builds the solution, and loads CICS into the Mainframe TN3270 Display. You can view the progress of this
process in the
Output window.
- 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.
- Press
Enter.
- Press
Ctrl+Shift+Z to clear the screen
- 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.
- Click
Continue.
This opens the main screen in your TN3270 display.
- Type
SMITH in the
Name field and press
Enter.
- 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.
- Press
F10 (Step Over).
The debugger steps to this line:
IF RC ^= DFHRESP(NORMAL) THEN
- Hover over the
RC field to view its contents.
- Press
F10 two more times to step to the line that reads:
IF NAMEDI = (45) '00'x THEN
- Right-click the text
NAMEDI and choose
QuickWatch to see data for the NAMEDI expression..
- Click
Close to close the
QuickWatch dialog box.
- Click
Continue.
Program execution stops on your next breakpoint:
EXEC CICS WRITEQ
This line writes the processed input data (SMITH) to CICS temporary storage.
- Click
Continue.
Program execution stops on your final breakpoint:
EXEC CICS XCTL PROGRAM ('STAFF03')
This line calls the program
STAFF03.
- 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.
- Click
Debug > Stop Debugging.
Stop the STAFF
enterprise server instance
- On the
Server Explorer, right-click the
STAFF server, and then select
Stop from the context menu.
This concludes the tutorial.