Debugging a local CICS transaction with TXSeries or CICS TX

You can debug a local CICS® transaction with TXSeries® or CICS TX.

About this task

Note: Effective 9 August 2024, IBM withdraws from marketing IBM CICS TX Standard (5900-ALU) and IBM CICS TX Advanced (5737-K69).
To configure IBM® Debug for Linux® on x86 with TXSeries or CICS TX, follow these steps:

Procedure

  1. Change the AllowDebugging attribute of Region Definition (RD) of CICS region to yes. You can use the below command to change the region configuration for debugging:
    cicsupdate -r REGION_NAME -c rd AllowDebugging=yes
  2. Compile the CICS COBOL program to be debugged with the -a flag if you are using cicstcl, or by adding the -g option if you are compiling using the cob2 compiler command. For example:
    cicstcl -a -lIBMCOB prog.ccp
    Note: Transactions that begin with the letter C cannot be debugged, because this is reserved for CICS internal use.
  3. Set the following environment variable in the region's environment file and cold start the region:
    DER_DBG_PATH=Path_to_source_files [To inform IDEBUG to pick the source file 
                                           from the specified path]
    CICS_IDEBUG_LIBPATH=/opt/ibm/cobol/debug/usr/lib/
  4. Configure the region to use the Distributed Debugger through the CDCN supplied transaction:
    1. Connect to the region using cicsterm client (or you could use any other 3270 based terminal emulator).
    2. Run the CDCN transaction. The first screen of the CDCN transaction is shown below:
       CDCN              CICS Debugging Configuration Transaction
       
       
              DISPLAY :(         )                               DEBUG  : ON
       
       
       To configure for a ter
      minal specify the TERMID            TERMID : (    )
       
       
       To configure for a system specify the SYSID               SYSID  : (    )
       
       
       To configure for a transaction specify the TRANSID        TRANSID: (    )
       
       
       To configure for a program specify the PROGRAM            PROGRAM: (    )
       
       
       
       ENTER:    COMMIT SELECTION
       PF1 : HELP                PF2 : DEBUG ON/OFF        PF3 : EXIT
       PF4 : MESSAGES            PF5 : UNDEFINED           PF6 : UNDEFINED
       PF7 : UNDEFINED           PF8 : UNDEFINED           PF9 : UNDEFINED
       PF10: UNDEFINED           PF11: UNDEFINED           PF12: UNDEFINED
    3. Use CDCN to configure appropriate CICS® resources such as a specific transaction or a specific program. CDCN also allows you to debug all programs that run on a specified terminal or that are routed to a specific system. If you specify more than one resource, CDCN takes the following order of precedence:
      1. TERMID
      2. SYSID
      3. TRANSID
      4. PROGRAM
      For example, to debug a PROGRAM resource called CUSTECIC take the following steps:
      1. In the CDCN screen, set the DISPLAY: field to the IP address of the machine and the port where the Distributed Debugger user interface is running.
      2. To debug the CUSTECIC program alone, set the PROGRAM field to CUSTECIC. The figure below shows the contents of CDCN screen after the changes:
         CDCN              CICS Debugging Configuration Transaction
         
         
                DISPLAY : 9.100.194.80:9005                        DEBUG  : ON
         
         
         To configure for a terminal specify the TERMID            TERMID : (    )
         
         
         To configure for a system specify the SYSID               SYSID  : (    )
         
         
         To configure for a transaction specify the TRANSID        TRANSID: (    )
         
         
         To configure for a program specify the PROGRAM            PROGRAM: CUSTECIC
         
         
         
         ENTER:    COMMIT SELECTION
         PF1 : HELP                PF2 : DEBUG ON/OFF        PF3 : EXIT
         PF4 : MESSAGES            PF5 : UNDEFINED           PF6 : UNDEFINED
         PF7 : UNDEFINED           PF8 : UNDEFINED           PF9 : UNDEFINED
         PF10: UNDEFINED           PF11: UNDEFINED           PF12: UNDEFINED
      3. Press Enter. The following messages are displayed to show that the debugger has been configured successfully:
        There are 2 messages:
        
        ERZI04066I: Successfully configured debugging on program 'CUSTECIC'
        ERZI04072I: The display to be used for the debugging information is 
        '9.100.194.80:9005 '
      4. Press Enter, followed by F3, to exit the CDCN transaction.

What to do next

To start debugging CICS programs using the Eclipse IDE on your workstation, follow these steps:
  1. Open the Eclipse IDE Debug perspective, and click Listen to begin listening on the port that is configured for debugging from the CICS region using the CDCN transaction. The default port is 8001.
  2. Execute the transaction or program and make sure that the transaction or program is already configured for debugging using the CDCN transaction.
  3. Now you can see the program source displayed on your Eclipse IDE and the program is under the control of the debugger. You can use the debugger options to continue debugging the CICS COBOL program.