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
end
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
end
end
execsql "CLOSE CURSOR :CURSOR"
address dsnrexx "DISCONNECT"
rc = rxsubcom('DELETE','DSNREXX','DSNREXX')
EXIT
sqlerror:
say 'SQLCODE ='sqlcode
say 'SQLSTATE='sqlstate
say 'SQLERRMC='sqlerrmc
say 'SQLERRP ='sqlerrp
say 'SQLERRD ='sqlerrd.1','sqlerrd.2','sqlerrd.3,
||','sqlerrd.4','sqlerrd.5','sqlerrd.6
say 'SQLWARN ='sqlwarn.0','sqlwarn.1','sqlwarn.2,
||','sqlwarn.3','sqlwarn.4','sqlwarn.5,
||','sqlwarn.6','sqlwarn.7','sqlwarn.8,
||','sqlwarn.9','sqlwarn.10
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.