Recording how many times each source line runs

To record of how many times each line of your code was executed:
  1. Use a log file if you want to keep a permanent record of the results. To learn how to create a log file, see Creating the log file.
  2. Issue the command:
    SET FREQUENCY ON;
    After you have entered the SET FREQUENCY ON command, your Source window is updated to show the current frequency count. Remember that this command starts the statistic gathering to display the actual count, so if your application has already executed a section of code, the data for these executed statements will not be available.
    If you want statement counts for the entire program, issue:
    GO ;
    LIST FREQUENCY * ;
    which lists the number of times each statement is run. When you quit, the results are written to the Log file. You can issue the LIST FREQUENCY * at any time, but it will only display the frequency count for the currently active compile unit.

Refer to the following topics for more information related to the material discussed in this topic.