Previous Topic Next topic Print topic


Introduction to Profiler

Note: This facility is supported in native COBOL only.

Profiler is a facility that enables you to obtain detailed statistics on the run-time performance of a COBOL program.

When you submit a COBOL source program to the Cob utility you can specify the PROFILE compiler directive. This causes the compiler to include code in your program that produces performance statistics about each paragraph of the program each time you run the compiled program. If your program contains no paragraphs, this report is not produced.

The performance statistics produced using the PROFILE compiler directive for that run of the program are contained in a file called program-name.ipf where program-name is the name of the program that was run. If an executable file is produced, then program-name is the first entry point name in the executable file.

These performance statistics are in compact form and first must be converted to a readable format, using Profiler.

By default, this file is created in the current working directory, but you can change this using the COBPRFDIR environment variable to specify an alternative directory. For example:

SET COBPRFDIR=/myipfdir

Profiler cannot be used on programs running multiple threads.

Previous Topic Next topic Print topic