Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Using Automatic Trap Activation (Code Debug CICS C)


This section demonstrates Code Debug’s Automatic Trap Activation (ATA) feature. ATA traps terminal-related transaction abends—but not breakpoints—without the user having an Code Debug session running.

Enabling the ATA feature is optional and is done with the AUTOMATIC_TRAP_ACTIVATION_TRAN_TO_RUN global parameter. With the parameter set to OFF (the default), ATA is deactivated. Setting the parameter to XPED, XPRT, or XPSP activates Automatic Trap Activation.

With ATA activated, if a terminal-related transaction is about to abend, the abend will be trapped and Code Debug will be invoked on the terminal or 3270 Web Bridge session where the transaction was initiated. The transaction used to invoke Code Debug is determined by the value of the AUTOMATIC_TRAP_ACTIVATION_TRAN_TO_RUN global parameter. If the AUTOMATIC_TRAP_ACTIVATION_NOTIFY_USER global parameter is set to YES, a customizable notification/decision screen will first be displayed. If the user decides to debug the abending transaction, the Source Listing (2.L), Break/Abend (2.1), or Assembler Break/Abend (2.20) screen will be displayed, depending on the transaction specified for the AUTOMATIC_TRAP_ACTIVATION_TRAN_TO_RUN parameter and the availability of program source.

Trapping an Abend with ATA

In the following demonstration, the global parameter AUTOMATIC_TRAP_ACTIVATION_TRAN_TO_RUN has been set to XPED, AUTOMATIC_TRAP_ACTIVATION_NOTIFY_USER has been set to YES, and source is available for program CWDEMC.

Important

For the purpose of properly demonstrating Automatic Trap Activation—but not for regular Code Debug CICS use—you will first make sure Code Debug is not active on the terminal being used.

  1. On a blank CICS screen, type XPND and press Enter. A message will be displayed saying either Code Debug is not active or it has been terminated.
  2. On a blank CICS screen, type XCCC and press Enter. The Demonstration Transaction screen shown in following figure will be displayed.

Demonstration Transaction Screen

 XCCC _____ - ENTER EMPLOYEE NUMBER                                        C123

  *** Compuware Corporation ***
  Demonstration Transaction (C)

  Enter desired employee above:

  00001 - Causes ASRA Abend

  00003 - Causes a write to temporary storage
  00004 - Starts up XCCC as an asynchronous task
  00005 - Used to show multiple CSECT support:  ASM subroutine
  00006 - Used to show multiple CSECT support:  C subroutine
  00007 - Used to show multiple MODULE support: ASM fetchable subroutine
  00008 - Used to show multiple MODULE support: C fetchable subroutine
  00009 - Used to show multiple MODULE support: ASM DLL subroutine
  00010 - Used to show multiple MODULE support: C DLL subroutine

  00333 - Causes a storage violation of an SAA
  00999 - Ends normally

3. To cause an ASRA abend, type 00001 and press Enter. The Automatic Trap Activation screen (following figure) will be displayed. Pressing Clear will allow the transaction abend to occur, while pressing Enter will display the appropriate Code Debug screen for debugging the transaction.

Automatic Trap Activation Screen

 -------------------------- AUTOMATIC TRAP ACTIVATION ----------------------C024
COMMAND ===>
MODULE: CWDEMC   CSECT: CWDEMC            COMPILED: 14 NOV 2006 - 14:54:47




       * * *  CODE DEBUG FOR CICS AUTOMATIC TRAP ACTIVATION - BULLETIN  * * *

           AN ABEND HAS BEEN AUTOMATICALLY TRAPPED AT THIS TERMINAL

          PRESS THE ENTER KEY TO CONTINUE DEBUGGING THIS TRANSACTION

                OR PRESS THE CLEAR KEY TO ABEND THE TRANSACTION


                    This portion of the screen can be setup

                    to present Customer-Specific Information

      using global parameters AUTOMATIC_TRAP_ACTIVATION_TEXT_LINE_1, 2, 3


                     FOR ADDITIONAL INFORMATION TYPE HELP

4. Press Enter. The Source Listing screen (2.L) will be displayed with the source of program CWDEMC positioned to the instruction at which the abend occurred.

At this point, the user would debug the abending transaction as described in Testing without Breakpoints.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*