Using the Profiler

The profiler is optimized for batch programs, and is especially useful with batch programs that run large numbers of transactions. It is more difficult to get good information from interactive programs. If user wait times are the issue you're trying to solve, trace files are more likely to return useful information than the profiler.

When you prepare to use the profiler, you should make an effort to run your application as cleanly as possible. This means making sure that your system isn't overloaded with large numbers of users, heavy system traffic, and so on. The cleaner the run, the more useful the information returned by the profiler.

The following steps describe how to perform profiling using default profiler and acuprof behavior.

  1. Compile your COBOL programs for debugging.

    You must compile with at least the -Gy option (to include at least minimal symbol information in the object file) for the profile to contain paragraph information. It is preferable to compile for full symbol information (-Gs) or for full source debugging (-Gd).

  2. Execute the program with the -p runtime option to create the acumon1.xml file.

    If a file called acumon1.xml already exists in the program directory, the profiler automatically changes the file name to create a file called acumon2.xml, acumon3.xml, and so on. This is intended to make it easier to compare multiple profiles of the same program.

    Note that the automatic naming scheme uses the first unused number when naming the file. This means that if a directory contains files called acumon1.xml, acumon2.xml, and acumon6.xml, the next profile created in that directory is called acumon3.xml.

  3. Use the command runcbl acuprof -a pathname (where pathname is the full path and file name of the XML file created by the profiler) to launch acuprof and process the profiler data.

    By default, acuprof creates a report file called acumon.rpt in the execution directory, then displays a message to indicate that the report was created successfully.

  4. Click OK to end acuprof execution, then open the newly created report file in the text editor of your choice.