To prepare for
debugging, follow these steps to locate the process ID for your CICS® application server:
- In the TXSeries® Administration
tool, click
- When you are prompted, select the correct CICS server for your CICS region.
- Enter the following in the CICS terminal:
CEMT INQUIRE TASK
The
output of this command will be the process ID for your CICS application server. You will attach to
this process for the purpose of debugging.
Note: This document describes the process for debugging a
COBOL CICS transaction. The
process for debugging a PL/I CICS transaction
is similar. The only difference is that the name of the PL/I program
will be PROGRAM_NAME.IBMPLI (where PROGRAM_NAME is
the name of your program) instead of TIMEZONE.IBMCOB.
First
you must make a "new copy" of the program. This unloads TIMEZONE.IBMCOB
from the CICS application server.
Open a local terminal for your CICS region
and type the following:
CEMT SET PROGRAM(TIMEZONE) NEW
Note: Make
sure you type CEMT in all capital letters. Otherwise, the command
will not work.
Attaching to CICS servers.
- Open the z/OS® Projects
perspective.
- From the Run pull-down menu, select Debug.
- Select Attach to a Running Process and
click New.
- Select the Main tab. In the Project
field, select the project you are working with.
- Click Browse next to the Process
ID input field. Minimize any Windows® console
windows that appear.
- Select the first "cicsas.exe" process listed. Click OK.
- Click Debug.
- Minimize any Windows console
windows that appear.
- If a pop-up window appears with the message "No error message
text available" click OK.
- Important: Repeat these steps with new debug
configurations until you have attached to all the running instances
of cicsas.exe.
Establishing a breakpoint on the load of the CICS executable program. (In
this case, TIMEZONE.IBMCOB.)
- Select the first running cicsas.exe process that you have attached
to.
- Right-click in the Breakpoints view. Select Add Breakpoint,
then Load.
- Enter TIMEZONE.IBMCOB for the library name. Click Finish.
Resuming the cicsas.exe processes.- Expand the first running cicsas.exe process listed, if it is not
already expanded. Right-click the line of text that starts with "State:".
- Select Resume.
- Repeat these steps for all the cicsas.exe processes that you are
attached to.
Running the transaction.- When the CICS terminal
starts, type: TMZN
- Press Control (the 3270 terminal Return
key).
- The CICS terminal execution
should stop. (No arrow or time is displayed.)
Selecting the module.- Select the Modules view.
- Find and expand TIMEZONE.IBMCOB.
- Expand TIMEZONE.OBJ.
- Expand TIMEZONE.cbl.
- Under TIMEZONE.cbl, you should see a picture of two gears next
to TIMEZONE. Double click the picture. The TIMEZONE.cbl source is
displayed.
Changing to the preprocessed source.- Right-click the display of the TIMEZONE.cbl source code. Select Change
Text File.
- Select the TIMEZONE.ppr file from the BuildOutput subdirectory
of your project.
- Click OK. A preprocessed version of your
COBOL source file is displayed with all the EXEC CICS lines expanded.
Setting the breakpoint.- In the TIMEZONE.cbl source, set a breakpoint at the first executable
line of COBOL source.
- From the Run pull-down menu, select Resume. You
can now step through and debug your program.