Managing Programs Enabled to Collect Profiling Data
Managing Programs Enabled to Collect Profiling Data
Managing Programs Enabled to Collect Profiling Data
Changing a program that is enabled to collect profiling data by using the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) commands will implicitly cause profiling data counts to be zeroed if the change requires the program be recreated. For example, if you change a program that is enabled to collect profiling data from optimization level *FULL to optimization level 40, any collected profiling data will be implicitly cleared. This is also true if a program that is enabled to collect profiling data is restored, and FRCOBJCVN(*YES *ALL) is specified on the Restore Object (RSTOBJ) command.
Likewise, updating a program that is enabled to collect profiling data by using the Update Program (UPDPGM) or Update Service Program (UPDSRVPGM) commands will implicitly cause profiling data counts to be cleared if the resulting program is still enabled to collect profiling data. For example, program P1 contains modules M1 and M2. Module M1 bound in P1 is enabled to collect profiling data but module M2 is not. So long as one of the modules is enabled, updating program P1 with module M1 or M2 will result in a program that is still enabled to collect profiling data. All profiling data counts will be cleared. However, if module M1 is changed to no longer be enabled to collect profiling data by specifying *NOCOL on the profiling data (PRFDTA) parameter of the Change Module (CHGMOD) command, updating program P1 with M1 will result in program P1 no longer being enabled to collect profiling data.
You can explicitly clear profiling counts from the program by specifying the *CLR option on the profiling data (PRFDTA) parameter of the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) commands. Note the program must not be activated to use the *CLR option.
If you no longer want the program to collect profiling data, you can take one of the following actions:
- Specify *NOCOL on the profiling data (PRFDTA) parameter of the Change Program (CHGPGM) command.
- Specify *NOCOL on the profiling data (PRFDTA) parameter of the Change Service Program (CHGSRVPGM) command.
Either action changes the program back to the state before it collected profiling data. You can also change the PRFDTA value of the modules to *NOCOL with the CHGMOD command or by recompiling the modules and rebinding the modules into the program.