IDUG Content Committee

 View Only

About zParms

By Emil Kotrc posted Oct 11, 2021 10:05 PM


About zParms

zParms, also known as DSNZPARMs, SYSPARMS, or just subsystem parameters, are crucial configuration parameters for a Db2 for z/OS subsystem that define the operating characteristics. There are more (used to be) than 300 zParms and they've come a long history of additions, removals, and default changes. Do you ever have a chance to review them since they were initially implemented in your shop? Do you have a chance to monitor what is new in this space?

Changes in zParms may have significant impact on the entire subsystem and because of that proper planning and testing is always important, and unfortunately not always simple. Some of them may be even specific to certain scenarios, so everyone must be careful before making updates.

Let's do a short recap of the zParms and hopefully share some of your experience below in the comments.

Directory of subsystem parameters

IBM lists all the zParms, plus the application default values, in this directory. It not only lists all the parms and descriptions, but also the defining macro and whether the parm is online updatable or not.

You usually configure your zParms using the Db2 installation panels, which then tailor the DSNTIJUZ job. There are also a couple of zParms that are not available in the panels, you can see them here and also inside the DSNTIJUZ job.

DSNTIJUZ uses a set of macros to compile the zParms into a configuration module. There are in total six macros that categorize zParms. You can find all the macros in the SDSNMACS library to see more details:

  • DSN6ARVP - archive log dataset parms
  • DSN6FAC - DDF parms
  • DSN6GRP - data sharing parms
  • DSN6LOGP - Db2 log parms
  • DSN6SPRM - DBM1 parms
  • DSN6SYSP - system parms
  • (In the past there was also DSN6ENV - environmental settings)

The zParms are loaded during the start of the subsystem, using the START DB2 command and specifying the zParms module, otherwise the default is taken.

To update your zParms, you need to follow this procedure, some of them cannot be changed online and require Db2 restart, some of them even require further actions, as described here. The refresh of zParms can be done via -SET SYSPARM command.

zParms simplification

IBM apparently has an ongoing zParms simplification initiative in Db2 12. Some time ago they led a survey by Chris Crone to learn about the zParms and their usage at customer sites. You can still find the results of the survey here. Definitely, worth reading even though it was released at the beginning of 2018.

Since then, IBM released several PTFs that remove some of the obsolete zParms to simplify the system parameters management:

      You can read more details about these PTFs in a great IBM blog here.

      See your zParms

      There are couple of ways, how you can explore your current zParms - from Db2 control blocks, if you are geeky and DSNWCBDZ is your friend, IFCID 106, or through SQL to vendor tools. One of the simplest way is to use Db2 supplied stored procedure ADMIN_INFO_SYSPARM (there used to exist a DSNWZP procedure in the past as well, deprecated in Db2 12 ). Below is a super-simple example I just used on our subsystem, you can see a more advanced script here. You may also use the sample program DSN8ED7 shipped with Db2.

      //REXXGEN  EXEC PGM=IEBGENER                                     
      //SYSIN    DD  DUMMY                                             
      //SYSPRINT DD  SYSOUT=*                                          
      //SYSUT2   DD  DSN=&&TEMPPDS(ZPARMS),                            
      //             DISP=(,PASS),                                     
      //             UNIT=SYSDA,SPACE=(TRK,(1,1,1),RLSE),              
      //             DCB=(RECFM=FB,LRECL=80)                           
      //SYSUT1   DD *                                                  
       /* REXX */                                                      
        parse arg ssid                                                 
        address tso "SUBCOM DSNREXX"                                   
        if rc then do                                                  
          rc = rxsubcom('ADD','DSNREXX','DSNREXX')                     
          if rc then exit                                              
        address dsnrexx                                                
        connect ssid                                                   
        if sqlcode \= 0 then call sqlerror                             
        proc = 'SYSPROC.ADMIN_INFO_SYSPARM' /* procedure to execute */ 
        empty = ''                                                     
        emptI = -1                                                     
        msg = left(' ', 1331, ' ')          /* output message */       
        msg_ind = ''                        /* indicator not null */   
        /* call the procedure */                                       
        execsql "call :proc (:empty :emptI, :rc, :msg :msg_ind)"       
        /* stored procedure returns +466: number of result sets */     
        if sqlcode <  0 then call sqlerror                             
        /* to get the output from the call,                            
           we need to associate the locator */                         
        execsql "DESCRIBE PROCEDURE",                                  
      	  " :proc INTO :sqlda"                                   
        if sqlcode \= 0 then call sqlerror                             
        execsql "ASSOCIATE LOCATOR (:result) ",                        
      	  "WITH PROCEDURE :proc"                                 
        if sqlcode \= 0 then call sqlerror                             
        /* allocate cursor for the result set */                       
        execsql "ALLOCATE C101 CURSOR FOR RESULT SET :result"          
        if sqlcode \= 0 then call sqlerror                             
        cursor = 'C101'                                                
        execsql "DESCRIBE CURSOR :cursor INTO :sqlda"                  
        if sqlcode \= 0 then call sqlerror                             
        do until(sqlcode \= 0)                                               
          execsql "FETCH C101 INTO " ,                                       
            ":rownum, :macro, :parameter, :install_panel" ,                  
            ", :install_field, :install_location, :valux, :additional_info"  
          if sqlcode = 0 then do                                             
            say parameter '=' valux                                          
        execsql "CLOSE CURSOR :CURSOR"                                       
        address dsnrexx "DISCONNECT"                                         
        rc = rxsubcom('DELETE','DSNREXX','DSNREXX')                          
        say 'SQLCODE ='sqlcode                                               
        say 'SQLSTATE='sqlstate                                              
        say 'SQLERRMC='sqlerrmc                                              
        say 'SQLERRP ='sqlerrp                                               
        say 'SQLERRD ='sqlerrd.1','sqlerrd.2','sqlerrd.3,                    
        say 'SQLWARN ='sqlwarn.0','sqlwarn.1','sqlwarn.2,                    
        exit 8                                                               
      //RUNREXX  EXEC  PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)                  
      //STEPLIB  DD  DISP=SHR,DSN=prefix.SDSNLOAD                        
      //SYSEXEC  DD  DSN=&&TEMPPDS,DISP=(OLD,DELETE)                         
      //SYSTSPRT DD  SYSOUT=*                                                
      //SYSPRINT DD  SYSOUT=*                                                
      //SYSUDUMP DD  SYSOUT=*                                                
      //SYSTSIN  DD  *                                                       
      %ZPARMS  ssid                                                          

      The output looks like this, please note how the bit values are returned:

      AUDITST = 00000000000000000000000000000000      
      CONDBAT = 0000000600                            
      CTHREAD = 00800                                  
      DLDFREQ = ON                                    
      IDBACK = 00800                                  
      IDFORE = 00800                                  
      CHKTYPE = SINGLE                                
      CHKFREQ = 0000500000                            
      CHKLOGR = NOTUSED                                
      CHKMINS = NOTUSED                                
      MON = 00000000000000000000000000000000          
      MONSIZE = 0001048576                            
      SYNCVAL = NO                                    
      RLFAUTH = SYSIBM                                
      RLF = NO                                        
      RLFENABLE = DYNAMIC                              
      RLFTBL = 01                                      
      RLFERR = NOLIMIT                                
      RLFERRSTC = NOLIMIT                              
      MAXDBAT = 00600                                  
      DSSTIME = 00005                                  
      EXTSEC = YES                                    
      SMFACCT = 11000000000000000000000000000000      
      SMFSTAT = 10111100000000000000000000000000      
      SMFCOMP = OFF                                    
      DEL_CFSTRUCTS_ON_RESTART = NO                    
      ROUTCDE = 1000000000000000                      
      STORMXAB = 00000                                
      STORTIME = 00180                                
      STATIME_MAIN = 00060                            
      STATIME = 00005                                  
      TRACLOC = 00016                                  
      PCLOSET = 00045                                  
      TRACSTR = 00000000000000000000000000000000      
      TRACTBL = 00016                                  
      URCHKTH = 000                                    
      WLMENV = DSNWLSG                                
      PTASKROL = YES                                  
      EXTRAREQ = 00100                                
      EXTRASRV = 00100                                
      TBSBPOOL = BP2                                  
      IDXBPOOL = BP3                                  
      LBACKOUT = AUTO                                  
      BACKODUR = 005                                  
      URLGWTH = 0000000000                            
      UIFCIDS = NO                

      Also, please note that the procedure does not return just the zParms, but also application defaults (DECP), plus IRLM parameters.

      zParms recommendations

      Recommending good zParm settings is difficult as it usually depends on the particular use case. There are some recommended values in the doc, if you are a SAP user, there are recommendations in the DSNTIDXB sample or on this page. There are also some IDUG sessions available, I would point out for example this one: Top 10 Overlooked and Neglected zParms by Adrian Collett, Session Code A18, presented at IDUG EMEA 2018 (available for download).

      I believe the IDUG community would welcome any good suggestions you might have, please share them in the comments below :-)

      Author: Emil Kotrč

      Created: 2021-10-11 Mon 10:11