Our dynamic DSNZPARM functionality was first developed years before the IBM Db2 development team implemented the SET SYSPARM command.
For many of the ZPARMs, the ZPARM value impacts not only the content of the ZPARM load module, but also the content of one or more Db2 control blocks. For example, Db2 might use a ZPARM value in a calculation and then store the result of that calculation in a Db2 control block. In the early years of dynamic DSNZPARM development, when adding update support for a ZPARM, we would need to deduce what Db2 control block updates would need to be made and then make those Db2 control block updates within our code while also updating the ZPARM load module.
When a SET SYSPARM command is processed by Db2, Db2 also updates both the ZPARM load module and the Db2 control blocks. Years ago, CA Db2 development recognized an opportunity to harness the power of this Db2 SET SYSPARM processing, which would eliminate the necessity to implement code of our own to update the DB2 control blocks.
As you have noticed, a SET SYSPARM command is not executed for all the ZPARM values that our product updates. SET SYSPARM commands are executed only for ZPARMs for which update support was added after our SET SYSPARM utilization enhancement had been implemented and for a handful of ZPARMs for which Db2 maintenance changed what Db2 control block updates are necessary.
Our product harnesses the power of the SET SYSPARM command by building a copy of the current ZPARM module, making the single ZPARM update in our copy, executing a SET SYSPARM command, intercepting execution of that SET SYSPARM command, replacing the ZPARM module specified in the SET SYSPARM command with our modified copy of the current ZPARM module, and then allowing SET SYSPARM command processing to be completed using our modified copy of the current ZPARM module.
It’s important to understand that a SET SYSPARM command executed via our dynamic DSNZPARM code will only ever update a single ZPARM value. This is very different from what would happen if you executed a SET SYSPARM command on your own, doing that could update many ZPARM values.