Previous Topic Next topic Print topic


Invoking Profiler from the Command Line

Note: This facility is supported in native COBOL only.

To start Profiler from the command prompt, use the following command:

cobprof filenames directives

where the parameters are:

filenames
One or more files containing compact Profiler output. Profiler always searches for a file with the filename extension .ipf; if you specify any other extension, it is ignored.
directives
One or more of the directives that control the operation of Profiler. To specify a directive to Profiler, you must precede it with a plus sign (+). You can precede each directive with a plus sign; alternatively, you can specify one at the start of a list of directives.

Directives must be separated by one or more spaces. Where a Profiler directive takes a parameter, you can enclose the parameter either in quotation marks or in parentheses. If you use either of these, however, you must escape them using the backslash character ( \).

When you run Profiler, the following banner is displayed in the report:

* Micro Focus COBOL Profiler
* name-1
.
.
.
* name-n

where name is one of the files listed in filenames at the command line.

The following example shows the report, if you are using Profiler from the command line. If you submit to the Cob utility the program prog1 with the PROFILE directive set, run the program, and then enter:

cobprof prog1 +LIST

the following output is produced on the console:

* Micro Focus COBOL Profiler
* prog1
 Total time: 172 milliseconds. Module called once.

%time   time    entries  micros/entry    paragraph
-----------------------------------------------------------------
64.53   111     21       5           TEST-ROUTINE
17.44   30      1        30          PARA1
16.28   28      15       2           NAME-ENTRY
1.74    3       1        3           END-SECTION
0.00    0       1        0           INITIAL(UNNAMED) PARAGRAPH
Previous Topic Next topic Print topic