ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

SET SYSPARM command in Thread Terminator

book

Article ID: 212402

calendar_today

Updated On:

Products

Thread Terminator for DB2 for z/OS

Issue/Introduction

We had not noticed until recently that when you update a field there is in some cases a SET SYSPARM done, for example here is the output from a change to DSMAX;

PTT1098I THE FOLLOWING COMMAND EXECUTED AT 16:54:05 ON 2021-02-25 BY USER ...
PTT1036I INPUT: SET DSMAX VALUE(2000    )                                     
PTT1063I EXECUTING DB2 COMMAND: -SET SYSPARM LOAD(DSNX247Z)                   
PTT1061I DSN9022I  !DA1PROD DSNZCMD0 'SET SYSPARM' NORMAL COMPLETION          
PTT1079I DSMAX REQUEST WAS SUCCESSFULLY PROCESSED.  OLD VALUE = 20001, NEW VALUE = 2000

What is the reason for a -SET SYSPARM LOAD command in Thread Terminator?.  

Regards.

 

Environment

Release : 20.0

Component : Thread Terminator

Resolution

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.