Invoking Profiler from the Command Line

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 
* Copyright (C) Micro Focus 1984-2016. All rights reserved.
* PROGRAM1
Total time:        156 milliseconds.      Module loaded once.
-------------------------------------------------------------------------------
Call Count  Program
-------------------------------------------------------------------------------
         1  program1
-------------------------------------------------------------------------------
% time      time   entries  micros/entry  (paragraph OF) Section
-------------------------------------------------------------------------------
79.00       123         1    123000      perf-log-1 OF main-logic-1
14.00        22        16      1375      perf-call-1 OF main-logic-1
 7.00        11         1     11000      main-logic-1