Format dumps by using the DSNWDMP statement

You can use the DSNWDMP statement to specify the dump records to be used as input, and causes the Db2 dump formatter (DSNWDPRD) to be invoked, which formats the specified Db2 control blocks.

Format the Db2 control blocks in a dump by changing the parameters on the DSNWDMP control statement. The format of this control statement and the options that can be specified are shown in the following diagram.

Read syntax diagramSkip visual syntax diagramDSNWDMPSUMDUMP=YES,SUBSYS= nnnn,SUMDUMP=NO,SUBSYS= nnnn ,TTTT=1TT=2TT=3,AA,SA= asid,LG,ALL,ds-optionssm-optionsst-optionsdm-optionsbm-optionssh-optionsdb-optionset-optionsdi-optionsdisys-optionsrs-optionssp-optionssq-optionslo-optionsrm-options
ds-options:
Read syntax diagramSkip visual syntax diagramDS=1DS=2DS=3DS=4,LM=1LM=2LM=3,TOKEN= xxxxxxxx
sm-options:
Read syntax diagramSkip visual syntax diagramSM=1SM=2SM=3SM=4SM=5SM=6,SMSA= asid,PHB= phb-addr
st-options:
Read syntax diagramSkip visual syntax diagramST=1ST=2ST=3
dm-options:
Read syntax diagramSkip visual syntax diagram DM=1DM=2,CT= xxxxxxxx
bm-options:
Read syntax diagramSkip visual syntax diagramBM=1BM=2BM=3,BBIP= vvvv,DBID= yyyy,OBID= zzzz
sh-options:
Read syntax diagramSkip visual syntax diagramSH=1SH=2SH=3SH=4SH=5
db-options:
Read syntax diagramSkip visual syntax diagramDB=1,DBID= yyyyDB=2,DBID= yyyyDB=3,DBID= yyyyDB=4,DBID= yyyy ,OBID= zzzz DB=5,DBID= yyyy ,OBID= zzzz ,CT= xxxxxxxx
et-options:
Read syntax diagramSkip visual syntax diagramET=1ET=2
di-options:
Read syntax diagramSkip visual syntax diagramDI=1DI=2,TOKEN= xxxxxxxx
disys-options:
Read syntax diagramSkip visual syntax diagramDISYS=1
rs-options:
Read syntax diagramSkip visual syntax diagramRS=1RS=2
sp-options:
Read syntax diagramSkip visual syntax diagramSP=1SP=2SP=3
sq-options:
Read syntax diagramSkip visual syntax diagramSQ=1SQ=2SQ=3
Start of changelo-options:
Read syntax diagramSkip visual syntax diagramLO=1LO=2LO=3LO=4LO=5LO=6LO=7LO=8
End of change
Start of changerm-options:
Read syntax diagramSkip visual syntax diagramRM=1RM=2RM=3RM=4
End of change

Separate multiple operands by commas, not blanks. A blank that follows any operand in the control statement terminates the operand list, and any subsequent operands are ignored. The following table lists and explains each of the various keywords that can be specified in the Db2 control statement for formatting dumps.

Table 1. Keywords to format SVC dumps that are issued by Db2
Keyword Explanation
SUBSYS= nnnn Specifies the site-defined Db2 subsystem name (nnnn). Range is one to four characters.

Optional if SUMDUMP=YES; required if SUMDUMP=NO.

Refer to SUMDUMP Information for more information.

TT Formats the Db2 global trace table.
  • If TT is specified without a suboption, format the global trace table.
  • If TT=1, display summary lines.
  • If TT=2, display the TT=1 information, as well as data items.
  • If TT=3, and DS is also specified, filter information by EB.
AA Formats significant Db2 control blocks in all active address spaces for the subsystem.
SA Formats significant Db2 control blocks that are associated with a single address space. The control statement must designate the ASID in hexadecimal (up to four digits). Apostrophes and leading zeros can be included or omitted (as in DE, 00DE, or '00DE').
LG Formats a long form of the significant Db2 global control block structures. Includes all resource manager-specific global information as well as the system-wide global control blocks.
ALL Formats all significant Db2 control blocks. Includes the trace table, control blocks in global storage, and control blocks in all active address spaces for the subsystem.

Equivalent to specifying TT, AA, and LG.

SUMDUMP Specifies the part of the dump data set to be used as input to the dump formatter.
  • If SUMDUMP=YES, the input dump data is to be obtained from the summary portion of the dump data set.
  • If SUMDUMP=NO, the input dump data is to be obtained from the non-summary portion of the dump data set.

The DSNWDPRD dump formatter always tries to format the same control blocks and data structures, regardless of whether input dump data is obtained from the summary or non-summary portion of the dump data set.

DS Specifies the level of detail about agents to report.
  • If DS=1, display information about only those agents at thread level that are on the allied agent chain are reported.
  • If DS=2, display information about all agents on the allied agent chain are reported.
  • If DS=3, display information about the system agent chains, plus all agents on the allied chain are reported. The system agent chains are needed to obtain details of parallel tasks and DDF tasks.
  • If DS=4, in addition to the information for DS=3, the LUWID (Logical Unit of Work ID), XID (Global Transaction ID), user and accounting information to be displayed for each agent.
LM Specifies information about IRLM to report.
  • If LM=1, report TRWA statistics.
  • If LM=2, if the agent is waiting for an IRLM request, report the status of the last request.
  • If LM=3, list the held locks for every agent.
SM Specifies information about Storage Manager to report.
  • If SM=1, display the PHB chains from the GPVT. This information gives an idea of global storage usage.
  • If SM=2, in addition to the information for SM=1, display the SHB chains from each PHB.
  • If SM=3, display the information for SM=2 for every address space that is connected to Db2.
  • If SM=4, in addition to the information for SM=3, display statistics on the amounts of allocated and free storage in the variable pools.
  • If SM=5, in addition to the information for SM=4, display a sample of allocated elements and attempt to determine the module that GETMAINed the storage.
  • If SM=6, in addition to the information for SM=5, display free elements.
PHB Specifies a PHB address. If SM is specified, the storage manager information is displayed only for the PHB with this address.
ST Specifies information about stack storage.
  • If ST=1, display the PSW, registers from the SDWA, and save area trace the abending task, except for a console dump. If the DS option is also specified, display the high-level SKB and stack storage usage.
  • If ST=2, in addition to the information for ST=1, display a formatted save area trace for each stack. The DS option must also be specified.
  • If ST=3, and the DS option is also specified, in addition to the information for ST=2, display a formatted display of stack storage.
SMSA Specifies storage information for only the requested ASID and for global storage.
DM Specifies the Data Manager information to report:
  • If DM=1, format agent DMTR and LKTR traces.
  • If DM=2, in addition to the information for DM=1, display parent lock and claim and drain information for agent.
BM Specifies Buffer Manager information to report:
  • If BM=1, format agent BBTR trace.
  • If BM=2, in addition to the information for BM=1, display agent BBRA information.
  • If BM=3, format all PBs and PB0. To restrict the amount of information that is reported, you can filter by buffer pool, DBID, or OBID.
SH Specifies data sharing information to report:
  • If SH=1, format agent BBTR trace.
  • If SH=2, in addition to the information for SH=1, display agent BBRA information.
  • If SH=3, in addition to the information for SH=2, display agent BBRA information.
  • If SH=4, in addition to the information for SH=3, display agent BBRA information.
  • If SH=5, in addition to the information for SH=4, display agent BBRA information.
DB Specifies database descriptor information to report:
  • If DB=1, list the DBDs that are in memory. If DBID is also specified, list information only for that DBID.
  • If DB=2, in addition to the information for DB=1, display DBD section information.
  • If DB=3, in addition to the information for DB=2, display OBD information.
  • If DB=4, format information for the specified DBID and OBID. The DBID and OBID parameters are required.
  • If DB=5, in addition to the information for DB=4, display trigger and referential constraint information. The DBID and OBID parameters are required.
CT Specifies the CT address for a specific agent. Use this parameter with the DM or DB option to narrow the output to a single agent.
ET Specifies information about exception states:
  • If ET=1, list exception states.
  • If ET=2, in addition to the information for ET=1, list LPL, GRECP, and WEPR information.
DI Specifies information about DDF threads to report:
  • If DI=1, DDF DTM (Distributed Transaction Manager) related information for the thread.
  • If DI=2, in addition to the information for DI=1, DDF DC (Data Communications) related information for the thread.
DISYS Specifies information about DDF system to report:
  • If DISYS=1, general DDF system-related information.
TOKEN Specifies the TOKEN value for a specific thread to be displayed. Use this option with the DI option and the DS=3 or DS=4 option. A warning message is displayed if the TOKEN value is invalid or no threads are associated with the specified TOKEN.
RS Specifies the Relational Data Services information to report:
  • If RS=1, display SQL statement and high-level Relational Data Services information.
  • If RS=2, in addition to the information for RS=1, display more detailed information, including plan and package information and SQLCA information.
SP Specifies the stored procedure information to report:
  • If SP=1, display stored procedure header information.
  • If SP=2, display run time information about WLM stored procedures.
  • If SP=3, display detailed information about the stored procedures, including trace information.
Start of changeSQEnd of change Start of changeSpecifies the status information to report on Db2 internal service tasks in the system services address space (ssnmMSTR), database services address space (ssnmDBM1), and DDF address space (ssnmDIST):
  • If SQ=1, display the current status of all service tasks.
  • If SQ=2, in addition to the SQ=1 information, display a list of waiters on the service task queue.
  • If SQ=3, in addition to the SQ=2 information, display latch information.
End of change
Start of changeLOEnd of change Start of changeSpecifies the log manager information to format and report:
  • If LO=1, display BSDS information.
  • Start of changeIf LO=2, in addition to the LO=1 information, display active log data set information and active log pairs.End of change
  • If LO=3, in addition to the LO=2 information, display archive log information.
  • If LO=4, in addition to the LO=3 information, display archive log reader information.
  • If LO=5, in addition to the LO=4 information, display log buffer information.
  • If LO=6, display physical log record information.
  • If LO=7, display logical log record information.
  • If LO=8, display help information.
End of change
Start of changeRMEnd of change Start of changeSpecifies the resource manager vector table (RMVT) and resource manager function table (RMFT) information to format and report:
  • If RM=1, display RMVT information.
  • If RM=2, display RMFT information.
  • If RM=3, in addition to the RM=2 information, display RMFT information in compressed format.
  • If RM=4, in addition to the RM=2 information, display RMFT information in full format.
End of change

Use the following keyword default values:

  • If the SUBSYS keyword is specified with SUMDUMP=YES, the SUBSYS keyword is used only if no summary records are found in the dump data set. In this case, the SUBSYS keyword is used to locate significant Db2 control blocks within the non-summary portion of the dump data set.
  • If none of the following operands are specified on a DSNWDMP control card, the default is ALL.
    AA     SA     LG
  • For each set of the following operands, the first operand overrides the operands that follow it when all operands are used in the same control statement. This behavior is because the first operand generates formatted data that includes the formatted data that would be generated by the operands that follow it.
    ALL     TT
    ALL     LG      
    ALL     AA      SA

    For example, ALL overrides LG if both operands are specified.

  • If the DS option is not specified, the output does not contain formatted agent information.

SUMDUMP information

Because the formatted control blocks consist of both volatile and static data, input dump data selection should be based on the state of the control blocks at a time that is as close as possible to the time of the error.

SUMDUMP=YES
For SVC dumps, the default is to use summary data records as input to the dump formatter because the summary dump records contain volatile data that was captured at a time close to the time of the error. Specifying YES ensures that relevant Db2 diagnostic information is sent.
SUMDUMP=NO
Because non-summary data is obtained asynchronously to the current system activity when the dump is generated, volatile data might have been altered or lost by the time it was placed into the dump data set.

Use this option if errors occur when you gather dump data or formatting the summary portion of the dump data set. Appropriate error messages are issued in these circumstances. In addition, use this option to format stand-alone or dynamic (z/OS® console) dumps.

DS information

Use the DS option to help diagnose hangs and waits. The DS option gives you a snapshot of the activity in Db2 at the time the dump was taken.

The output that was generated when you specify the DS=1 option looks like the following.

Figure 1. Sample output from DSNWDMP with DS=1 option
         1             2          3         4 
ACE: 0A85FD28 Status: T   Req: 010B    Allied Chain
          5                 6                  7                   8                9 
Authid: FRNT     Plan: FRNMFRNT Corrid: GT00FRNT     Corrname: PLACQA09 Token: 000004C0
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
0A85FD98 ISCICQ09(007D) ISCICQ09(007D) 00000000 007ABD90 Running   8BA6D1FA
Jobname #T2QMBB  ASID(0032)
         1             2          3         4 
ACE: 0D5C7990 Status: T   Req: 0005    Allied Chain
CT:  67290030 Sh/Lg: 67248840            140K  Vlong: 67248BD0             56K
          5                 6                  7                   8                9 
Authid: SOFPROD  Plan: DSNREXX  Corrid: #T2QMBB      Corrname: DB2CALL  Token: 0001389C
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
    10          11                12       13       14      15         16                         17 
0D5C7A20 #T2QMBB (0032) #T2QMBB (0032) 00000000 007BF788 Running   8F869734                 01/20/2004 15:27:02.850291
Figure Label Description
 1  Address of the agent's ACE.
 2  Status of the thread. This value is the same as the ST and A fields in output from the command -DISPLAY THREAD.
 3  Request count. This value is the same as the REQ field in output from the command -DISPLAY THREAD.
 4  The chain that the ACE is on. Possible values are System Chain, Allied Chain, or Stored Proc.
 5  Authorization ID associated with a signed-on connection. This value is blank if no sign-on took place.
 6  Plan name for the agent. This value is the same as the PLAN field in output from the command -DISPLAY THREAD.
 7  Correlation ID for the agent. This value is the same as the ID field in output from the command -DISPLAY THREAD.
 8  Correlation name for the agent.
 9  Token that is associated with the thread. This value is the same as the TOKEN field in output from the command -DISPLAY THREAD.
 10  Address of the execution block.
 11  ASID of the primary address space.
 12  ASID of the home address space.
 13  Address of a spawned execution block, if there is one.
 14  The TCB address, if this is a TCB. This value is zero if this is an SRB.
 15  Whether the agent was suspended by Db2 at the time of the abend.
 16  Value in Register 14 the last time that suspend was requested. This value is valid only if the agent is suspended.
 17  Timestamp when the suspend occurred.

Run DSNWDMP with option DS=1 or DS=2 to view allied threads in Db2. Option DS=2 generates information about all allied threads, while DS=1 generates only active threads.

The following output is from DSNWDMP with option DS=2 after a Db2 hang at shutdown. The details of the first ACE show that a CICS® thread was active at the time of the shutdown, which is the reason for the hang.

Figure 2. Output from DSNWDMP with DS=2 option after Db2 hangs at shutdown
ACE: 0A85FD28 Status: T   Req: 010B    Allied Chain
Authid: FRNT     Plan: FRNMFRNT Corrid: GT00FRNT     Corrname: PLACQA09 Token: 000004C0
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
0A85FD98 ISCICQ09(007D) ISCICQ09(007D) 00000000 007ABD90 Running   8BA6D1FA
ACE: 0A040318 Status: N   Req: 0003    Allied Chain
Authid: ISCICQ09 Plan:          Corrid:              Corrname: PLACQA09 Token: 00000000
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
0A040388 ISCICQ09(007D) ISCICQ09(007D) 00000000 007A53C8 Running   00000000

Output from DS=3 shows both allied agents and system agents. Option DS=3 is helpful for diagnosing problems in such areas as CPU parallelism and the distributed data facility, where the tasks are related to allied work but appear on the system ACE chain.

The following output shows DSNWDMP with option DS=3 after a hang in a parallel task.

Figure 3. Output from DSNWDMP with DS=3 for a hang involving CPU parallelism
ACE: 04FA2D28 Status: PT* Req: 0000    System Chain
Authid: USRT001  Plan: MYPLAN   Corrid: RUN01        Corrname: BATCH    Token: 00000000
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
04FA2D98 V42ADBM1(0067) V42ADBM1(0067) 80000000 00000000 Running   8BA6D1FA
ACE: 04FA2BB8 Status: PT* Req: 0000    System Chain
Authid: USRT001  Plan: MYPLAN   Corrid: RUN01        Corrname: BATCH    Token: 00000000
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
04FA2C28 V42ADBM1(0067) V42ADBM1(0067) 80000000 00000000 Running   8BA6D1FA
ACE: 04FA2A48 Status: PT* Req: 0000    System Chain
Authid: USRT001  Plan: MYPLAN   Corrid: RUN01        Corrname: BATCH    Token: 00000000
EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
04FA2AB8 V42ADBM1(0067) V42ADBM1(0067) 80000000 00000000 Running   8BA6D1FA

LM information

Use the LM option to diagnose locking problems. The following output was obtained by running DSNWDMP with options DS=1 and LM=3 to display information about held locks for an agent at thread level:
Figure 4. Output from DSNWDMP with DS=1 and LM=3 for held lock information
  ACE: 05419548 Status: T * Req: 0004    Allied Chain
  Short:  7F298820
  Authid: USRT001  Plan: TSTA85   Corrid: GT00XA85     Corrname: CICS41   Token: 00000003
  EB       Primary(Asid)  Home(Asid)     EBSPAWND TCB/SRB  -Status-- R14
  054195D8 VC1ADBM1(0067) CICS41F (001C) 00000000 005A9388 Suspended 85539590
     IRLM statistics for ACE: 05419548
     Suspend count - latch conflict:                      0
     Suspend count - other conflict:                      0
     Lock request count:                                  2
     Unlock request count:                                1
     Query request count:                                 0
     Change request count:                                0
     Other IRLM requests count:                           0
     P-Lock Lock requests:                                0
     P-Lock Change requests:                              0
     P-Lock Unlock requests:                              0
     Lock requests sent to XES :                          0
     Change requests sent to XES :                        0
     Unlock requests sent to XES :                        0
     Suspends due to IRLM Global contention :             0
     Suspends due to XES Global contention :              0
     Suspends due to false contention :                   0
     Requests denied due to retained lock :               0
     Notify messages sent :                               0
      WU requested a LOCK at 03/21/1997 20:00:47.736272 for resource 0C0000020004001700000000 at state 3 
      with modify interest.
      This is a local resource that is held on this subsystem.
      This request is incompatible with a lock on this subsystem and the current states of this resource are:
      The local resultant held state is 8
      The local modify held state is 8
      Resource 0C0000020001005F00000000 is held in state 02 and was granted at 03/21/1997 20:00:47.620534.
      Resource 0C000004E3E2E3C1F8F54040 is held in state 04 and was granted at 03/21/1997 20:00:45.712241.
      Work unit 0067009505419548 holds 00000002 resource locks.