Information
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.

Viewing Source


  1. Type XPED CWDEMC on a blank CICS screen and press Enter. This fastpath access method lets you immediately see source for a specific program.

During execution, Code Debug CICS automatically displays the data names in the current statement. In addition, you can select any number of data names to be displayed during execution. These are called explicit keeps. Code Debug CICS displays these fields in the keep window area of the Source Listing screen (2.L) when an abend or a breakpoint occurs. This feature allows you to monitor data names and modify their values during program execution.

Warning

Important

For a more complete explanation of autokeeps, BMC encourages you to use the HELP AUTOKEEPS command built into Code Debug CICS. This Help topic provides highly detailed information and examples, as well as performing real-time evaluations to point out any restrictions you might encounter while attempting to use these facilities.

In the previous example, an abend occurred because the field dHoursWorked contained invalid data. By setting a keep on this field, you can view it to monitor its value and check its effect on the program execution.

2. To turn on the trace facility, type SET TRACE ON on the COMMAND line and press Enter.

3. Type FIND FIRST dHoursWorked on the COMMAND line and press Enter. The display is positioned to the definition of dHoursWorked.

Warning

Important

In C, variable names are case-sensitive.

4. Type the K (Keep) line command to the left of dHoursWorked and press Enter. The value of dHoursWorked will appear in the keep window when you execute the program.

Whenever a keep is set, a K is placed on the line where the data name is defined in following figure.

Selecting a Data Name to Keep on the Source Listing Screen (2.L) Before SET TRANSLATE Commands

 ------------------------------- SOURCE LISTING (2.L) ---------------------C024
COMMAND ===>                                                   SCROLL ===> CSR
 MODULE: CWDEMC      ************************ KEEP set *************************
------   --------------------------------------------------------------------->
011729   830       |
011730   831   370 |  decimal(3,0)      dHoursWorked         = 0d;
011730 K 831   370 +  _Decimal(3,0)      dHoursWorked         = 0d;
011731   832   371 |  decimal(7,2)      dHourlyRate          = 0.00d;
011731   832   371 +  _Decimal(7,2)      dHourlyRate          = 0.00d;
011732   833   372 |  decimal(5,1)      dTaxRate             = 0.0d;
011732   833   372 +  _Decimal(5,1)      dTaxRate             = 0.0d;
011733   834   373 |  decimal(11,2)     dGrossPay            = 0.00d;
011733   834   373 +  _Decimal(11,2)     dGrossPay            = 0.00d;
011734   835   374 |  decimal(11,2)     dYTDPay              = 0.00d;
011734   835   374 +  _Decimal(11,2)     dYTDPay              = 0.00d;
011735   836   375 |  decimal(9,2)      dGrossTax            = 0.00d;
011735   836   375 +  _Decimal(9,2)      dGrossTax            = 0.00d;
011736   837   376 |  decimal(9,2)      dYTDTax              = 0.00d;
011736   837   376 +  _Decimal(9,2)      dYTDTax              = 0.00d;
011737   838       |
011738   839   377 |  CHAR              chConvertBuffer Ý16¨ = { Null, };
011738   839   377 +  CHAR              chConvertBuffer Ý16¨ = { '\0', };
011739   840       |
011740   841   378 |  BOOL              bProcessSuccessful   = FALSE;

Depending on the code page used by your terminal, line 11738 in Selecting a Data Name to Keep on the Source Listing Screen (2.L) Before SET TRANSLATE Commands may show brackets around the number 16 or it may show other characters, such as the symbol for Yen currency before the 16 and an umlaut following the 16. This occurs when the C compiler was told to use code page 1047 and your terminal is using a different code page. The Yen currency and umlaut characters are from code page 037. If you experience this problem, use the SET TRANSLATE primary command to correct it. For code page 037, enter the following two primary commands:

  • An automatic variable that is defined (with or without an assigned value) but not subsequently referenced can be completely optimized out.
  • A variable that is used in such a manner (e.g. to hold an intermediate or perhaps a ‘const’ value) may be partially optimized out … storage (stack space) may be assigned, but it’s assigned storage location may never be initialized or updated. This is a common occurrence with ‘const’ integer variables whose value is small enough to permit the compiler to embed the constant value within the generated machine code. These types of instructions execute faster than other instructions that reference memory.
  • A global variable declared as ‘extern’ but never referenced in the program will not generate executable code that references that memory location. Consequently the CSS ‘C’ language processor will be unable to determine that variable’s location in memory.
  • A global variable declared as ‘static’ but never referenced in the program will likely be completely optimized out.
  • Variables local to an inlined function are, in effect, local to the function caller. At present, the CSS language processor is unable to determine the correct parentage. Parentage is needed to establish addressability within the current runtime stack frame.
  • SET TRANSLATE AD BA
  • SET TRANSLATE BD BB

If your terminal uses a code page other than 037, replace the BA and BB above with that code page’s hexadecimal representation for open bracket and close bracket.

If the listing uses a code page other than 1047, replace the AD and BD above with that code page’s hexadecimal representation for open bracket and close bracket. Selecting a Data Name to Keep on the Source Listing Screen (2.L) After SET TRANSLATE Commands shows the result after using the SET TRANSLATE command.

Selecting a Data Name to Keep on the Source Listing Screen (2.L) After SET TRANSLATE Commands

 ------------------------------- SOURCE LISTING (2.L) ---------------------C024
COMMAND ===>                                                   SCROLL ===> CSR
 MODULE: CWDEMC      ************ Translate table has been changed *************
------   --------------------------------------------------------------------->
011729   830       |
011730   831   370 |  decimal(3,0)      dHoursWorked         = 0d;
011730 K 831   370 +  _Decimal(3,0)      dHoursWorked         = 0d;
011731   832   371 |  decimal(7,2)      dHourlyRate          = 0.00d;
011731   832   371 +  _Decimal(7,2)      dHourlyRate          = 0.00d;
011732   833   372 |  decimal(5,1)      dTaxRate             = 0.0d;
011732   833   372 +  _Decimal(5,1)      dTaxRate             = 0.0d;
011733   834   373 |  decimal(11,2)     dGrossPay            = 0.00d;
011733   834   373 +  _Decimal(11,2)     dGrossPay            = 0.00d;
011734   835   374 |  decimal(11,2)     dYTDPay              = 0.00d;
011734   835   374 +  _Decimal(11,2)     dYTDPay              = 0.00d;
011735   836   375 |  decimal(9,2)      dGrossTax            = 0.00d;
011735   836   375 +  _Decimal(9,2)      dGrossTax            = 0.00d;
011736   837   376 |  decimal(9,2)      dYTDTax              = 0.00d;
011736   837   376 +  _Decimal(9,2)      dYTDTax              = 0.00d;
011737   838       |
011738   839   377 |  CHAR              chConvertBuffer [16] = { Null, };
011738   839   377 +  CHAR              chConvertBuffer [16] = { '\0', };
011739   840       |
011740   841   378 |  BOOL              bProcessSuccessful   = FALSE;

 

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

BMC AMI DevX Code Debug for CICS 17.02