Sign in

docs ILE Concepts

Managing Programs with Profiling Data Applied to Them

Managing Programs with Profiling Data Applied to Them

Managing Programs with Profiling Data Applied to Them

If a program that has profiling data applied is changed by using the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) commands, you will lose applied profiling data if both of these conditions are true:

  • The change requires the program to be recreated.

    Note: The optimization level of a program that has profiling data applied cannot be changed to be less than optimization level 30. This is because the profiling data is optimization level dependent.

  • The required profiling observability has been removed.

Also all applied profiling data will be lost if the change request is to enable the program to collect profiling data, regardless of whether profiling observability has been removed or not. Such a request will result in a program that is enabled to collect profiling data.

Here are some examples:

  • Program A has procedure order and block order profiling data applied. *BLKORD observability has been removed from the program but *PRCORD observability has not. A CHGPGM command is run to change the performance collection attribute of program A, which also requires the program to be recreated. This change request will cause program A to no longer be block order profiled. However, the procedure order profiling data will still be applied.
  • Program A has procedure order and block order profiling data applied. *BLKORD and *PRCORD observability have been removed from the program. A CHGPGM command is run to change the user profile attribute of program A, which also requires the program to be recreated. This change request will cause program A to no longer be block order or procedure order profiled. Program A will go back to the state before the profiling data was applied.
  • Program A has block order profiling data applied. *BLKORD observability has been removed from the program. A CHGPGM command is run to change the text of the program, which does not require the program to be recreated. After this change, program A will still be block order profiled.
  • Program A has procedure order and block order profiling data applied. This does not remove *PRCORD and *BLKORD observability from the program. Run a CHGPGM command to enable the program to collect profiling data (this recreates the program). This causes program A to no longer be block order or procedure order profiled. This leaves the program in a state as if profiling data was never applied. This enables the program to collect profiling data with all profiling data counts cleared.

A program that has had profiling data applied to it (*APYALL, *APYBLKORD, or *APYPRCORD) cannot be immediately changed to an unprofiled program by specifying PRFDTA(*NOCOL) on the CHGPGM or CHGSRVPGM commands. This feature is intended as a safety net to avoid accidental loss of profiling data. If this is truly what is intended, the program must first be changed to PRFDTA(*COL), effectively removing the existing profiling data, and then changed to PRFDTA(*NOCOL).