When the compile option COUNT is enabled, the data will be written to a file specified in the environment variable name SYSCOUNT.
Output Format of Count Information
The output format of count information is shown below:
[1] NetCOBOL COUNT INFORMATION(END OF RUN UNIT) DATE 2007-07-04 TIME 20:45:21 PID:00000123 TID:00000099 [2] STATEMENT EXECUTION COUNT PROGRAM-NAME : COUNT-PROGRAM [3] [5] [6] STATEMENT [4] EXECUTION PERCENTAGE NUMBER PROCEDURE-NAME/VERB-ID COUNT (%) ------------- --------------------------- ----------------- ----------- 15 PROCEDURE DIVISION COUNT-PROGRAM 17 DISPLAY 1 14.2857 19 CALL 1 14.2857 21 DISPLAY 1 14.2857 23 STOP RUN 1 14.2857 31 PROCEDURE DIVISION INTERNAL-PROGRAM 33 DISPLAY 1 14.2857 35 INVOKE 1 14.2857 37 EXIT PROGRAM 1 14.2857 ------------- --------------------------- ----------------- ----------- 7 [7] VERB EXECUTION COUNT PROGRAM-NAME : COUNT-PROGRAM [11] [13] [8] [9] [10] PERCENTAGE [12] PERCENTAGE VERB-ID ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ------------ -------- ---------- -------- ------------------ -------- CALL 1 1 100.0000 1 25.0000 DISPLAY 2 2 100.0000 2 50.0000 STOP RUN 1 1 100.0000 1 25.0000 ------------ -------- ---------- -------- ------------------ -------- 4 4 100.0000 4 [7] VERB EXECUTION COUNT PROGRAM-NAME : COUNT-PROGRAM (INTERNAL-PROGRAM) [11] [13] [8] [9] [10] PERCENTAGE [12] PERCENTAGE VERB-ID ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ------------ -------- ---------- -------- ------------------ -------- DISPLAY 1 1 100.0000 1 33.3333 EXIT PROGRAM 1 1 100.0000 1 33.3333 INVOKE 1 1 100.0000 1 33.3333 ------------ -------- ---------- -------- ------------------ -------- 3 3 100.0000 3 [14] PROGRAM EXECUTION COUNT PROGRAM-NAME : COUNT-PROGRAM [18] [20] [15] [16] [17] PERCENTAGE [19] PERCENTAGE PROGRAM NAME ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ----------- ---------- ----------- --------- --------------- ---------- COUNT-PROGRAM 4 4 100.0000 4 57.1429 INTERNAL 3 3 100.0000 3 42.8571 ----------- ---------- ----------- --------- --------------- ---------- 7 7 100.0000 7 [1] NetCOBOL COUNT INFORMATION(END OF RUN UNIT) DATE 2007-07-04 TIME 20:45:21 PID=00000123 TID=00000099 [2] STATEMENT EXECUTION COUNT CLASS-NAME : COUNT-CLASS [3] [5] [6] STATEMENT [4] EXECUTION PERCENTAGE NUMBER PROCEDURE-NAME/VERB-ID COUNT (%) ------------- --------------------------- ----------------- ----------- 15 PROCEDURE DIVISION COUNT-METHOD 16 DISPLAY 1 50.0000 37 EXIT PROGRAM 1 50.0000 ------------- --------------------------- ----------------- ----------- 2 [7] VERB EXECUTION COUNT CLASS-NAME : COUNT-CLASS METHOD-NAME : COUNT-METHOD [11] [13] [8] [9] [10] PERCENTAGE [12] PERCENTAGE VERB-ID ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ------------ -------- ---------- -------- ------------------ -------- DISPLAY 1 1 100.0000 1 50.0000 END METHOD 1 1 100.0000 1 50.0000 ------------ -------- ---------- -------- ------------------ -------- 2 2 100.0000 2 [14] VERB EXECUTION COUNT CLASS-NAME : COUNT-CLASS [18] [20] [15] [16] [17] PERCENTAGE [19] PERCENTAGE VERB-ID ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ------------ -------- ---------- -------- ------------------ -------- COUNT METHOD 2 2 100.0000 2 100.0000 ------------ -------- ---------- -------- ------------------ -------- 2 2 100.0000 2 [21] PROGRAM/CLASS/PROTOTYPE METHOD EXECUTION COUNT PROGRAM/CLASS/PROTOTYPE METHOD EXECUTION COUNT PROGRAM/CLASS [23] [24] PERCENTAGE [26] PERCENTAGE /METHOD-NAME ACTIVE VERB TOTAL VERB (%) EXECUTION COUNT (%) ------------ ----------- ---------- ---------- ---------------- --------- COUNT PROGRAM 7 7 100.0000 7 100.0000 COUNT CLASS 2 2 100.0000 2 100.0000 ------------ ----------- ---------- ---------- ---------------- --------- 9 9 100.000 9
[1] Indicates that this is an output file for the COUNT function. In the parentheses, the stage when this report is generated will be denoted. There are four stages when this report could be generated:
END OF RUN UNIT
Upon completion of a COBOL run unit (i.e., at the time a STOP RUN statement or an EXIT PROGRAM statement of a main program is executed), a report is produced.
ABNORMAL END
When the program ends abnormally, a report is produced.
END OF INITIAL PROGRAM
Upon completion of a program that has the INITIAL attribute, a report is produced. Upon completion of the internal program, however, no report will be produced.
CANCEL PROGRAM
When a program that has the compile option COUNT enabled is canceled by a CANCEL statement, a report is produced. Upon completion of an internal program, however, no report will be produced.
[2] The execution counts of source program images are listed here. Execution counts are shown by compilation unit of a source program. If a compilation unit is a program, PROGRAM-NAME shows an external program-name. In case of a class, CLASS-NAME shows a class-name. In case of a method, CLASS-NAME shows a class-name and METHOD-NAME shows a method-name.
[3] Statement-numbers appear in the following format:
[COPY qualifying value-] line number
If one line contains two or more statements, the same line number will be assigned to the second and succeeding statements.
[4] Procedure names and statements are shown here. At the top of the procedure division, "PROCEDURE DIVISION" is followed by a program-name or method-name.
[5] Statement execution counts are shown here. At the end, the total of those execution counts is calculated.
[6] Percentage of the execution count for one specific statement vs. all executed statements.
[7] Execution counts by verb are listed here. Verb execution counts are shown by program unit or method unit. For programs having internal programs or for classes having two or more methods, therefore, two or more listings of execution counts by verb will appear. PROGRAM-NAME denotes a program-name in the following format:
PROGRAM-NAME: program-name [(called internal program)]
[8] Lists verbs in alphabetical order. Verbs to be listed here are those coded in the corresponding programs.
[9] The number of imperatives actually executed among those written in the source program.
[10] The total number of the verbs of that type found in the source program.
[11] Percentage of those verbs actually executed vs. the total, using the following formula: [9] / [10] * 100.
[12] Execution counts for each verb. At the bottom, the total of those execution counts is indicated.
[13] Percentage of the execution count for a specific verb vs. that for all, using the following formula: each verb's execution count/total execution count * 100.
[14] Execution counts by program or by method are listed here. This list is generated when a class or program has an internal program.
[15] Program- or method-names in the order listed in the source program.
[16] The number of verbs actually executed among those found in the source program.
[17] The total number of verbs of that type found in the source program.
[18] Percentage of actually executed verbs vs. the total number of verbs of that type, using the following formula: [16] / [17] * 100.
[19] Verb execution counts by program or method. At the bottom, the total of those execution counts is indicated.
[20] For each program or method, the percentage of actually executed verbs vs. the total number of the verbs of that type, using the following formula: verb execution count for each program (or method)/total verb execution counts for all programs (or methods) * 100.
[21] Verb execution counts by source program (compilation unit) are listed here. If one run unit has two or more source programs (or compilation units), the above-mentioned data repeatedly appear for each of such programs.
[22] Names of external programs, classes, and prototype methods.
[23] Refer to [16].
[24] Refer to [17].
[25] Refer to [18].
[26] Verb execution counts for each compilation unit. At the end, the total of those counts is indicated.
[27] Percentage of the verb execution counts for each compilation unit vs. that for all the compilation units. This is obtained by calculating the following: verb execution count for each compilation unit / verb execution count for all the compilation units * 100.