In R/HTPKGS panel IDB2 appears to be aggregating into the wrong DB2 plan. The details from INSIGHT history do not match the corresponding data in Detector.
Release : 20.0
Component : SYSVIEW Performance Management Option for DB2 for z/OS
The data seen in R/HTPKGS panel is confusing but sadly correct. The reason for the confusion is because the threads in question are RRSAF threads and the setup of ACCUMACC system parameter in Db2 which results in Db2 rolling up the accounting records. The records are rolled up based on the userid, transaction/application name and workstation name, the plan name is not part of the rollup rules. You will simply see the plan name from the last thread that was included in the rollup record. Note that this is not only true for this particular case but for any rollup record in general, so you cannot fully rely on the plan name when investigating the thread history for rollup records. It would seem that the only reliable way would be based on the rollup rules that you have setup in the ACCUMUID system parameter in Db2. Having said that there are two more things to point out:
1-Unlike Detector, Sysview for Db2 heavily relies on the accounting records that Db2 produces, so unless Db2 somehow provides the information about every plan that was executed by every thread in the rollup record, Sysview for Db2 doesn't have a mechanism to fetch this information in its own. Obviously this information is unavailable.
2.Despite the fact that the plan name in the HTDETL doesn't reflect all of the plans that were executed, the package included in our HTPKGS should still be correct. The reason is because the information about packages executed is provided in separate records(IFCID 239) which are created for the accounting record and not for a specific thread. So every package executed by every thread in a rollup record should be included in some IFCID239 that IDB2 will receive and properly associate with the accounting record despite the fact that it's a rollup.