HomeCobolPro FeaturesPowerJCL FeaturesJCLScript FeaturesContact E-JCLDeveloper Biographies

Original COBOL Program
                                                                                                                 

       identification division.
       Program-Id. COBOLR.
       date-compiled.
       author.   E-JCL Software, Inc.
      *
      * This sample COBOL program contains random COBOL statements and
      * is intended to demonstrate some of the run-time profiling
      * capabilities of CobolPro for z/OS.
      *
       environment  division.

       configuration   section  .
       source-computer. test-computer-name
      *                 with debugging mode
                        .

       object-computer. test-computer-name.
       special-names.

       data division.
       working-storage section.
       01 PROG-COBOLS                 PIC  X(8) VALUE '$$COBOLS'.
       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.
      *
       01 DATE-X                      PIC X(8).
      *
       procedure division.
      *
           Display 'Executing $$COBOLR *****************'
      *
           Accept DATE-X FROM DATE YYYYMMDD.
      *
           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 439    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
      *
           IF COUNT-A NOT = 0 CALL PROG-COBOLS END-CALL
           END-IF.
      *
           IF COUNT-E > 10000 CALL 'isplink'   END-CALL
           END-IF.
      *
           Perform 517      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 088    times
           COMPUTE COUNT-C = COUNT-C + 4
           End-Perform
      *
           goback
           .

                                                                 
Profiled COBOL Program with Run-Time Statement-Level Counts
                                                                              
       identification division.
       Program-Id. COBOLR.
       DATE-COMPILED. 09/01/11.
       author.   E-JCL Software, Inc.
      *
      * This sample COBOL program contains random COBOL statements and
      * is intended to demonstrate some of the run-time profiling
      * capabilities of CobolPro for z/OS.
      *
       environment  division.

       configuration   section  .
       source-computer. test-computer-name
      *                 with debugging mode
                        .

       object-computer. test-computer-name.
       special-names.

       data division.
       working-storage section.
       01 PROG-COBOLS                 PIC  X(8) VALUE '$$COBOLS'.
       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.
      *
       01 DATE-X                      PIC X(8).
      *
       procedure division.
      *
           Display 'Executing $$COBOLR *****************'               1
      *
           Accept DATE-X FROM DATE YYYYMMDD.                            1
      *
           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 439    times                                         1
           COMPUTE COUNT-A = COUNT-A + 2                                439
           MOVE COUNT-B TO COUNT-C                                      439
           MOVE COUNT-A TO COUNT-D                                      439
           ADD 17 TO COUNT-E                                            439
           DIVIDE COUNT-D BY 7 GIVING COUNT-E                           439
           SUBTRACT 9 FROM COUNT-C                                      439
           End-Perform
      *
           IF COUNT-A NOT = 0                                           1
                              CALL PROG-COBOLS END-CALL                 1
           END-IF.
      *
           IF COUNT-E > 10000                                           1
                              CALL 'isplink'   END-CALL                 0
           END-IF.
      *
           Perform 517      times                                       1
           COMPUTE COUNT-B = COUNT-B + 3                                517
           ADD      1 TO COUNT-C                                        517
           End-Perform
      *
           If  COUNT-C = 10 OR 20 OR 30 OR 400 OR 500                   1
           ADD 41 TO COUNT-B                                            0
           End-If
      *
           Perform 088    times                                         1
           COMPUTE COUNT-C = COUNT-C + 4                                88
           End-Perform
      *
           goback                                                       1
           .

                                                                                                       

                                                                 
COBOL Execution Profile Report
                                                                              

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

                 

                         COBOL Execution Profile Report

 Member: $$COBOLR                                             Date: 01.Sep.2011
                                                              Time: 08:36:06 PM

   

|---------------------------------|----------|----------|------------|---------|
|                                 |Number Of |Number Of |Number Of   |Runtime  |
|         COBOL Statement         |Statements|Statements|Statements  |Execution|
|                                 |          |Executed  |Not Executed|Count    |
|---------------------------------|----------|----------|------------|---------|
| Accept                          |        1 |        1 |          0 |        1|
| Add                             |        3 |        2 |          1 |      956|
| Call                            |        1 |        1 |          0 |        1|
| Call 'ISPLINK'                  |        1 |        0 |          1 |        0|
| Compute                         |        3 |        3 |          0 |     1044|
| Continue                        |        3 |        2 |          1 |        2|
| Display                         |        1 |        1 |          0 |        1|
| Divide                          |        1 |        1 |          0 |      439|
| Goback                          |        1 |        1 |          0 |        1|
| If                              |        6 |        6 |          0 |        6|
| Move                            |        2 |        2 |          0 |      878|
| Next Sentence                   |        3 |        1 |          2 |        1|
| Perform                         |        3 |        3 |          0 |        3|
| Subtract                        |        1 |        1 |          0 |      439|
|---------------------------------|----------|----------|------------|---------|
| Total                           |       30 |       25 |          5 |     3772|
|---------------------------------|----------|----------|------------|---------|

                                                                                                       

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