Rational Developer for System z

Debugging a local CICS transaction with TXSeries

This topic describes the process for debugging a COBOL CICS® transaction.

Before you begin

To prepare for debugging, you need to locate the process ID for your CICS application server and copy your program:

  1. Open the CICSTERM - CICS server selection window and select the correct CICS server for your CICS region.
  2. In the CICS Client 3270 Terminal Emulator, enter the following command in the CICS terminal:
    CEMT INQUIRE TASK
    Note: Make sure you type CEMT in all capital letters. Otherwise, the command will not work.

    The output of this command is the process ID for your CICS application server. You attach to this process for the purpose of debugging.

  3. To make a new copy of the program, enter the following command in the CICS Client 3270 Terminal Emulator:
    CEMT SET PROGRAM(TIMEZONE) NEW
    This command unloads TIMEZONE.ibmcob from the CICS application server.

Linux icon Rational® Developer for System z® does not support local debug or TXSeries on the Linux platform.

About this task

Note: The process for debugging a PL/I CICS transaction is similar. The only difference is that the name of the PL/I program is PROGRAM_NAME.IBMPLI (where PROGRAM_NAME is the name of your program) instead of TIMEZONE.ibmcob.

Attaching to CICS servers

Procedure

  1. Open the z/OS Projects or Enterprise Development perspective.
  2. From the Run menu, select Debug.
  3. Select Attach to a Running Process and click New.
  4. Select the Main tab. In the Project field, select the project you are working with.
  5. Click Browse next to the Process ID input field. Minimize any Windows console windows that appear.
  6. Select the first cicsas.exe process listed and click OK.
  7. Click Debug.
  8. Minimize any Windows console windows that appear.
  9. If a pop-up window appears with the message "No error message text available" click OK.
  10. 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

Procedure

  1. Select the first running cicsas.exe process that you have attached to.
  2. Right-click in the Breakpoints view and select Add Breakpoint, then Load.
  3. Specify TIMEZONE.ibmcob for the library name and click Finish.

Resuming the cicsas.exe processes

Procedure

  1. Expand the first running cicsas.exe process listed, if it is not already expanded. Right-click the line of text that starts with "State:"
  2. Select Resume.
  3. Repeat these steps for all the cicsas.exe processes that you are attached to.

Running the transaction

Procedure

  1. When the CICS terminal starts, type TMZN.
  2. Press Ctrl (the 3270 terminal Return key). The CICS terminal execution stops. (No arrow or time is displayed.)

Selecting the module

Procedure

  1. Select the Modules view.
  2. Find and expand TIMEZONE.ibmcob.
  3. Expand TIMEZONE.obj.
  4. Expand TIMEZONE.cbl. Under TIMEZONE.cbl, a picture of two gears shows next to TIMEZONE.
  5. Double click the picture. The TIMEZONE.cbl source is displayed.

Changing to the preprocessed source

Procedure

  1. Right-click the display of the TIMEZONE.cbl source code and select Change Text File.
  2. Select the TIMEZONE.ppr file from the BuildOutput subdirectory of your project.
  3. Click OK. A preprocessed version of your COBOL source file is displayed with all the EXEC CICS lines expanded.

Setting the breakpoint

Procedure

  1. In the TIMEZONE.cbl source, set a breakpoint at the first executable line of COBOL source.
  2. From the Run menu, select Resume. You can now step through and debug your program.

Feedback