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.

Analyzing the Data


  1. Press Clear.
  2. Type XPED CWDEMASM from a cleared CICS screen and press Enter to display the Source Listing screen (2.L).

The STATEMENT ANALYSIS area displays statistics for the last execution of CWDEMASM, as shown in the following figure.

Showing Statistics For Analysis on the Source Listing Screen (2.L)

 ----------------------------- SOURCE LISTING (2.L) ------------------------C024
 COMMAND ===>                                                   SCROLL ===> CSR
 MODULE: CWDEMASM CSECT: CWDEMASM          COMPILED: 09 JUN 2005 - 11.22
 ------   --------------------------------------------------------------------->
 000390   +         STM   14,12,12(13)        SAVE CALLER'S REGISTERS     @BBAC8
 000391   +*********************************************************************
 000392   +*              ESTABLISH CODE ADDRESSIBILITY
 000393   +*********************************************************************
 000394   +         USING *-4,3                                           @BBAC8
 000395   +         LR    3,15                                            @BBAC8
 000396   +*********************************************************************
 000397   +*              OBTAIN DYNAMIC STORAGE
 000398   +*********************************************************************
 000399   +         BAL   1,*+8                                               @L
 000400   +         DC    AL2(DFHEIEND-DFHEISTG)  LENGTH OF STORAGE           @L
 000401   +         DC    H'0'               IDENTIFIES CICS 1.7 LEVEL        @L
 000402   +         L     15,=V(DFHEAI0)                               @F8E1S @L
 000403   +         BALR  14,15               OBTAIN STORAGE           @F8E1S @L
 000404   +         ST    13,DFHEISA-DFHEISTG+4(,1)  CHAIN TO CALLER'S @F8E1S @L
 --------------------  S T A T E M E N T   A N A L Y S I S  --------------------
 STATEMENTS TO BE ANALYZED:    12           TOTAL ANALYZED COUNT: 8
 ANALYZED STATEMENTS EXECUTED: 8            HIGHEST COUNT:        1
 ANALYZED STATEMENTS NOT EXEC: 4            HIGHEST COUNT STMT:   000450
 PERCENTAGE STATEMENTS EXEC:   66           LABEL:  BUILDMP1

In this example, the statistics in the STATEMENT ANALYSIS area have changed to show the number of statements that were executed.

This area shows that 12 statements were set for analysis. Of these, 8 were executed and 4 were not. The 8 paragraphs were executed a total of 8 times (TOTAL ANALYZED COUNT), with each executing 1 time (HIGHEST COUNT). If program logic contained a loop, the HIGHEST COUNT would be more than 1 and the HIGHEST COUNT STMT would identify the statement number where the loop occurred. In this example, there is no loop, so instead the HIGHEST COUNT STMT shows the first occurrence of the statements with a COUNT of 1. LABEL shows the name of the paragraph that contains that statement.

3. Type L 450 in the COMMAND field to locate statement 450 (the first occurrence of the statements with a COUNT of 1) and press Enter to see where the most frequently executed statement is located.

Browsing Source Code on the Source Listing Screen (2.L)

 ------------------------------- SOURCE LISTING (2.L) ----------------------C024
 COMMAND ===>                                                   SCROLL ===> PAGE
 MODULE: CWDEMASM CSECT: CWDEMASM          COMPILED: 09 JUN 2005 - 11.22
 ------   --------------------------------------------------------------------->
 000450    BUILDMP1 LA    R0,PAYMAP1            MOVE                     0000001
 000451             LH    R1,PAYMP1AL           SPACES
 000452             LA    R14,SPACES1           TO
 000453             L     R15,=X'40000000'      MAP
 000454             MVCL  R0,R14                ONE.
 000455             MVC   PAYFLD1,MAPFLD1       MOVE
 000456             MVC   PAYFLD1A,MAPFLD1A     HEADINGS
 000457             MVC   PAYMSG3,MAPMSG3       TO
 000458             MVC   PAYMSG4,MAPMSG4       MAP
 000459             MVC   PAYMSG6,MAPMSG6       ONE
 000460             MVC   PAYMSG7,MAPMSG7       AND
 000461             MVC   PAYMSG8,MAPMSG8       SEND TO
 000462             MVC   PAYMSG9,MAPMSG9       SEND TO
 000463             MVC   PAYMSG10,MAPMSG10     SEND TO
 000464    SENDMP1  MVC   PAYEMP1,=C'_____'     SCREEN.                  0000001
 000465             MVC   PAYPRMPT(28),=C'- ENTER EMPLOYEE NUMBER     '
 000466    *        EXEC CICS SEND FROM(PAYMAP1) LENGTH(PAYMP1AL) ERASE
 000467             DFHECALL =X'040430000800000081000040000000',,,(______RF,PAYM
 ------                   1),(FB_2,PAYMP1AL)
 000468   +*********************************************************************

You can use the FIND COUNT command to browse through the source listing and examine the COUNT associated with each statement. You can also use the SHOW COUNT command to display the lines selected for analysis. By looking at these counts, you can easily see how your program is processing. If Code Debug’s trace function has been activated, you can also view the Program Trace (2.4) screen to review the logic flow.

You can reset the analysis by deleting the old COUNT command and entering a new COUNT command. It can be turned OFF by entering the DELETE COUNT command.

You can also use the COUNT command to check the overall efficiency of your program. Use the COUNT ALL command to set up an analysis for the entire program, then execute each logic path in the program without resetting the analysis. Review the STATEMENT ANALYSIS to determine if any code has not been executed. By leaving the analysis active and executing all logic paths in the program, you can easily pinpoint code that was not executed.

Warning

Important

The C, COBOL, and PL/I sample programs include a loop that leads to a storage violation. See section entitled “Analyzing-Execution-of-Program” in the C User Guide, the COBOL User Guide, or the PL/I User Guide.

Remember to end the session as described in Exiting Code Debug CICS and Ending a Debugging Session.

 

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