HomeCobolPro FeaturesPowerJCL FeaturesJCLScript FeaturesContact E-JCLDeveloper Biographies

Original COBOL Program
                                                                      

       IDENTIFICATION DIVISION.
       PROGRAM-ID. TEST001.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 SYSID-X                       PIC X(4).
       01 COUNT-A                       PIC S9(9) COMP VALUE 3.
       01 COUNT-B                       PIC S9(9) COMP VALUE 2.
       01 COUNT-C                       PIC S9(9) COMP VALUE 1.
       01 COUNT-D                       PIC S9(9) COMP VALUE 0.
       01 COUNT-E                       PIC S9(9) COMP VALUE 0.
       PROCEDURE DIVISION.
       0001-PARAGRAPH.
      *
           EXEC CICS
                WRITE OPERATOR
                TEXT('TEST001 *********************** 01')
           END-EXEC.
      *
           If  COUNT-B > COUNT-A  next sentence
           else
           continue
           end-if.
      *
           If  COUNT-B > COUNT-C next sentence else continue end-if.
      *
           If  COUNT-C > COUNT-B next sentence else continue end-if.
      *
           PERFORM 5 TIMES
           EXEC CICS ASKTIME END-EXEC
           END-PERFORM.
      *
           EXEC CICS WRITE OPERATOR
                TEXT('TEST001 *********************** 02')
           END-EXEC.
      *
           Perform 420    times
           COMPUTE COUNT-A = COUNT-A + 2
           MOVE COUNT-B TO COUNT-C
           MOVE COUNT-A TO COUNT-D
           ADD 17 TO COUNT-E
           DIVIDE COUNT-D BY 7 GIVING COUNT-E
           SUBTRACT 9 FROM COUNT-C
           End-Perform
      *
           PERFORM 21 TIMES
           EXEC CICS ASSIGN
                   SYSID(SYSID-X)
           END-EXEC
           END-PERFORM.
      *
           Perform 500      times
           COMPUTE COUNT-B = COUNT-B + 3
           ADD      1 TO COUNT-C
           End-Perform
      *
           If  COUNT-C = 10 OR 20 OR 30 OR 400 OR 500
           ADD 41 TO COUNT-B
           End-If
      *
           Perform 080    times
           COMPUTE COUNT-C = COUNT-C + 4
           End-Perform
      *
           Perform 10 times
           EXEC CICS RETURN  END-EXEC
           End-Perform
      *
           GOBACK.

                                                                     
Profiled COBOL Program with Run-Time Statement-Level Counts
                                                    

       IDENTIFICATION DIVISION.
       PROGRAM-ID. TEST001.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 SYSID-X                       PIC X(4).
       01 COUNT-A                       PIC S9(9) COMP VALUE 3.
       01 COUNT-B                       PIC S9(9) COMP VALUE 2.
       01 COUNT-C                       PIC S9(9) COMP VALUE 1.
       01 COUNT-D                       PIC S9(9) COMP VALUE 0.
       01 COUNT-E                       PIC S9(9) COMP VALUE 0.
       PROCEDURE DIVISION.
       0001-PARAGRAPH.
      *
           EXEC CICS                                                    1
                WRITE OPERATOR
                TEXT('TEST001 *********************** 01')
           END-EXEC.
      *
           If  COUNT-B > COUNT-A                                        1
                                  next sentence                         0
           else
           continue                                                     1
           end-if.
      *
           If  COUNT-B > COUNT-C                                        1
                                 next sentence                          1
                                               else
                                                    continue end-if.    0
      *
           If  COUNT-C > COUNT-B                                        1
                                 next sentence                          0
                                               else
                                                    continue end-if.    1
      *
           PERFORM 5 TIMES                                              1
           EXEC CICS ASKTIME END-EXEC                                   5
           END-PERFORM.
      *
           EXEC CICS WRITE OPERATOR                                     1
                TEXT('TEST001 *********************** 02')
           END-EXEC.
      *
           Perform 420    times                                         1
           COMPUTE COUNT-A = COUNT-A + 2                                420
           MOVE COUNT-B TO COUNT-C                                      420
           MOVE COUNT-A TO COUNT-D                                      420
           ADD 17 TO COUNT-E                                            420
           DIVIDE COUNT-D BY 7 GIVING COUNT-E                           420
           SUBTRACT 9 FROM COUNT-C                                      420
           End-Perform
      *
           PERFORM 21 TIMES                                             1
           EXEC CICS ASSIGN                                             21
                   SYSID(SYSID-X)
           END-EXEC
           END-PERFORM.
      *
           Perform 500      times                                       1
           COMPUTE COUNT-B = COUNT-B + 3                                500
           ADD      1 TO COUNT-C                                        500
           End-Perform
      *
           If  COUNT-C = 10 OR 20 OR 30 OR 400 OR 500                   1
           ADD 41 TO COUNT-B                                            0
           End-If
      *
           Perform 080    times                                         1
           COMPUTE COUNT-C = COUNT-C + 4                                80
           End-Perform
      *
           Perform 10 times                                             1
           EXEC CICS RETURN  END-EXEC                                   1
           End-Perform
      *
           GOBACK.
                                                      0

                                                                     
COBOL Execution Profile Report
                                                    

 CobolPro for z/OS                                     (C) E-JCL Software, Inc.

   

                         COBOL Execution Profile Report

  

 Member: $TEST001                                             Date: 01.Sep.2011
                                                              Time: 09:36:04 PM

  

|---------------------------------|----------|----------|------------|---------|
|                                 |Number Of |Number Of |Number Of   |Runtime  |
|         COBOL Statement         |Statements|Statements|Statements  |Execution|
|                                 |          |Executed  |Not Executed|Count    |
|---------------------------------|----------|----------|------------|---------|
| Add                             |        3 |        2 |          1 |      920|
| Compute                         |        3 |        3 |          0 |     1000|
| Continue                        |        3 |        2 |          1 |        2|
| Divide                          |        1 |        1 |          0 |      420|
| Goback                          |        1 |        0 |          1 |        0|
| If                              |        4 |        4 |          0 |        4|
| Move                            |        2 |        2 |          0 |      840|
| Next Sentence                   |        3 |        1 |          2 |        1|
| Perform                         |        6 |        6 |          0 |        6|
| Subtract                        |        1 |        1 |          0 |      420|
| Exec Cics Asktime               |        1 |        1 |          0 |        5|
| Exec Cics Assign                |        1 |        1 |          0 |       21|
| Exec Cics Return                |        1 |        1 |          0 |        1|
| Exec Cics Write Operator        |        2 |        2 |          0 |        2|
|---------------------------------|----------|----------|------------|---------|
| Total                           |       32 |       27 |          5 |     3642|
|---------------------------------|----------|----------|------------|---------|

Copyright © 2014 E-JCL Software, Inc. All rights reserved.