This function is used to obtain statistical information on which Natural objects were invoked during the execution of an application, and information on how often an object was invoked. Call statistics are deleted after resetting the debug environment.
To invoke the call statistics maintenance function
In the Debug Main Menu enter function code C.
Or:
Enter the following direct command:
CS
The Call Statistics Maintenance menu is displayed.
The functions provided in the Call Statistics Maintenance menu are explained in the following section whereas all print functions are described in Print Objects.
See the section Switch Test Mode On and Off.
When executing a Natural object with call statistics set to
ON, all calls made to a specific object are counted and the resulting
statistics can afterwards be displayed or printed.
To set call statistics to ON or OFF
In the Call Statistics Maintenance menu, enter function code
C to activate or deactivate call statistics.
Or:
Enter one of the following direct commands:
SET CALL ON
or
SET CALL OFF
Note
If the function is switched off and no call
statistics have been created or call statistics have been deleted by resetting the debug
environment, the information stored for statement execution statistics (see
Statement Execution Statistics Maintenance) is used for display. This
allows you to detect the non-invoked Natural objects during the execution of an
application.
This function provides an overview of the call frequency of all objects contained in a library.
To display the call frequency of all objects in a library
In the Call Statistics Maintenance menu, enter function code
1 and a library name.
Or:
Enter the following direct command:
DISPLAY OBJECT library
See also the syntax of DISPLAY in Command Summary and
Syntax.
If you do not specify a library name, the library where you are currently logged on is assumed by default.
A Display Call Statistics screen similar to the example screen shown in Display Called Objects appears.
The Display Call Statistics screen lists all objects in the
specified library and indicates their call frequency in the
Calls column on the right-hand side. For each call statement,
such as FETCH or CALLNAT, an entry with the name of the
object and a counter variable is written into the debug buffer. The counter is then
increased for each call of the corresponding object.
The screen invoked by this function corresponds to the Display Call Statistics screen, but only the objects that have been invoked are displayed.
To display called objects of a library
In the Call Statistics Maintenance menu,
enter function code 2 and a library name.
Or:
Enter the following direct command:
DISPLAY CALL library
See also the syntax of DISPLAY in Command Summary and
Syntax.
The Display Called Objects screen appears:
16:06:53 ***** NATURAL TEST UTILITIES ***** 2002-02-15
Test mode ON - Display Called Objects - Object
All
Object Library Type DBID FNR S/C Ver Cat Date Time Calls
*_______ SAG_____
MAINPGM SAG Program 10 32 S/C 3.1 2002-02-15 11:51 1
SUBPGM SAG Subprogram 10 32 S/C 3.1 2002-02-15 11:50 3
EMP-PGM SAG Program 10 32 S/C 3.1 2002-01-22 11:49 2
EMPLIND SAG Program 10 32 S/C 3.1 2001-08-13 11:18 1 |
If you do not specify a library name, the library where you are currently logged on is assumed by default.
The screen invoked by this function corresponds to the Display Call Statistics screen, but only the objects that have not been invoked are displayed.
To display non-called objects
In the Call Statistics Maintenance menu, enter function code
3 and a library name.
Or:
Enter the following direct command:
DISPLAY NOCALL library
See also the syntax of DISPLAY in Command Summary and
Syntax.
If you do not specify a library name, the library where you are currently logged on is assumed by default.
For an example screen, see Display Called Objects above.
With the print functions, you can directly route a generated list of call statistics to a
printer or download the list to a PC. You specify a printer as the output device on the
User Profile screen of the debugger. Use the debugger command
PROFILE (see the
section Navigation and Information Commands) to invoke this screen.
If you do not specify a library name, the library where you are currently logged on is assumed by default.
As indicated under Print Options below, to invoke one of the print functions, you can enter either a function code in the Statement Execution Statistics Maintenance menu, a line command on the Display Statement Lines screen, or a direct command at the command prompt.
| Print Function | Function Code | Direct Command |
|---|---|---|
| All Objects | PRINT OBJECT library
|
|
| Called Objects | PRINT CALL library
|
|
| Non-Called Objects | PRINT NOCALL
library
|
See also the syntax of PRINT in Command Summary and
Syntax.
Example of Generating and Printing Statistics in Batch in the section Batch Processing
If Entire Connection and Natural Connection are installed at your site, you can download a statistics list to a PC as described in the following instructions.
To download a list to a PC
At session start, specify the profile parameter PRINT as
follows:
PRINT=((1),AM=PC)
After session start, activate the PC connection using the following terminal command:
%+
Invoke and activate the debugger.
Invoke the User Profile screen by entering the debugger
command PROFILE
(see Navigation and Information Commands).
On the User Profile screen, in the Output
device field, replace the current entry by PCPRNT01 and
choose PF3 (Exit) to save the settings.
Activate the function and execute the application for which you want the debugger to collect statistics data.
From the statistics screen, choose a print function.
In the Entire Connection window that appears, you can specify the output file and the PC directory.