Syntax and options of the DIAGNOSE control statement

The DIAGNOSE utility control statement, with its multiple options, defines the function that the utility job performs.

You can create a control statement with the ISPF/PDF edit function. After you create it, save it in a sequential or partitioned data set. When you create the JCL for running the job, use the SYSIN DD statement to specify the name of the data set that contains the utility control statement.

Syntax diagram

Read syntax diagram
>>-DIAGNOSE--+-| diagnose statement |-+------------------------><
             '-END--------------------'   

diagnose statement:

>>-+---------------------+-------------------------------------->
   |       .-,-------.   |   
   |       V         |   |   
   '-TYPE(---integer-+-)-'   

>--+------------------------------------+----------------------->
   '-ALLDUMPS-+-----------------------+-'   
              |   .-,-------------.   |     
              |   V               |   |     
              '-(---X'abend-code'-+-)-'     

>--+-----------------------------------+------------------------>
   '-NODUMPS-+-----------------------+-'   
             |   .-,-------------.   |     
             |   V               |   |     
             '-(---X'abend-code'-+-)-'     

>--+-----------------------+--+--------------------+--+---------------------+-><
   '-| display statement |-'  '-| wait statement |-'  '-| abend statement |-'   

display statement:

>>-DISPLAY------------------------------------------------------>

>--+-OBD-+------------------+-table-space-name-+---------+-+-------+---+-><
   |     '-database-name--.-'                  +-ALL-----+ '-CLONE-'   |   
   |                                           +-TABLES--+             |   
   |                                           '-INDEXES-'             |   
   +-SYSUTIL-----------------------------------------------------------+   
   +-MEPL--------------------------------------------------------------+   
   +-AVAILABLE---------------------------------------------------------+   
   '-DBET-+-DATABASE--database-name------------------------+-+-------+-'   
          +-TABLESPACE-+----------------+-table-space-name-+ '-CLONE-'     
          |            '-database-name.-'                  |               
          '-INDEX--index-name------------------------------'               

wait statement:

Read syntax diagram
         .-----------------------------------------------------.   
         V                                                     |   
>>-WAIT----+-MESSAGE--message-id--+-------------------+------+-+-><
           |                      '-INSTANCE--integer-'      |     
           '-TRACEID--+-X'trace-id'-+--+-------------------+-'     
                      '-integer-----'  '-INSTANCE--integer-'       

abend statement:

>>-ABEND--+-MESSAGE--message-id--+-------------------+------+--+--------+-><
          |                      '-INSTANCE--integer-'      |  '-NODUMP-'   
          '-TRACEID--+-X'trace-id'-+--+-------------------+-'               
                     '-integer-----'  '-INSTANCE--integer-'                 

Option descriptions

TYPE(integer, …)
Specifies one or more types of diagnose that you want to perform.

integer is the number of types of diagnoses. The maximum number of types is 32. IBM® Software Support defines the types as needed to diagnose problems with IBM utilities.

ALLDUMPS(X'abend-code', …)
Forces a dump to be taken in response to any utility abend code.

X'abend-code' is a member of a list of abend codes to which the scope of ALLDUMPS is limited.

abend-code is a hexadecimal value.

NODUMPS(X'abend-code', …)
Suppresses the dump for any utility abend code.

X'abend-code' is a member of a list of abend codes to which the scope of NODUMPS is limited.

abend-code is a hexadecimal value.

DISPLAY
Formats the specified database items using SYSPRINT.
OBD database-name.table-space-name
Formats the object descriptor (OBD) of the table space.

database-name is the name of the database in which the table space belongs.

table-space-name is the name of the table space whose OBD is to be formatted.
ALL
Formats all OBDs of the table space. The OBD of any object that is associated with the table space is also formatted.
TABLES
Formats the OBDs of all tables in the specified table spaces.
INDEXES
Formats the OBDs of all indexes in the specified table spaces.
SYSUTIL
Formats every record from SYSIBM.SYSUTIL. This directory table stores information about all utility jobs.
MEPL
Dumps the module entry point lists (MEPLs) to SYSPRINT.
AVAILABLE
Start of changeDisplays the utilities that are installed on this subsystem in both bitmap and readable format. The presence or absence of the DB2® Utilities Suite for z/OS® (5655-V41) affects the results of this display. Message DSNU862I displays the output from DIAGNOSE DISPLAY AVAILABLE.
Related information:
End of change
DBET
Dumps the contents of a database exception table (DBET) to SYSPRINT.
DATABASE database-name
Dumps the DBET entry that is associated with the specified database.

database-name is the name of the database.

TABLESPACE database-name.table-space-name
Dumps the DBET entry that is associated with the specified table space.

database-name is the name of the database.

table-space-name is the name of the table space.

INDEX creator-name.index-name
Dumps the DBET entry that is associated with the specified index.

creator-name is the ID of the creator of the index.

index-name is the name of the index.

Enclose the index name in quotation marks if the name contains a blank.

CLONE
Indicates that DIAGNOSE is to display information for only the following specified objects:
  • Clone tables
  • Table spaces that contain clone tables
  • Indexes on clone tables
  • Index spaces that contain indexes on clone tables.
WAIT
Suspends utility execution when it encounters the specified utility message or utility trace ID. DIAGNOSE issues a message to the console. Utility execution does not resume until the operator replies to that message, the utility job times out, or the utility job is canceled. This waiting period allows events to be synchronized while you are diagnosing concurrency problems. The utility waits for the operator to reply to the message, allowing the opportunity to time or synchronize events.

If the utility message or trace ID is not encountered, processing continues.

ABEND
Forces an abend during utility execution if the specified utility message or utility trace ID is issued.
If the utility message or trace ID is not encountered, processing continues
NODUMP
Suppresses the dump that is generated by an abend of DIAGNOSE.
MESSAGE message-id
Specifies a DSNUxxx or DSNUxxxx message that causes a wait or an abend to occur when that message is issued.
message-id is the message, in the form of Uxxx or Uxxxx.
INSTANCE integer
Specifies that a wait or an abend is to occur when the MESSAGE option message is encountered a specified number of times. If INSTANCE is not specified, a wait or abend occurs each time that the message is encountered.

integer is the number of times that a message is to be encountered before a wait or an abend occurs.

TRACEID trace-id
Specifies a trace ID that causes a wait or an abend to occur when the ID is encountered. You can find valid trace IDs can be found in data set prefix.SDSNSAMP(DSNWEIDS).
trace-id is a trace ID that is associated with the utility trace (RMID21). You can specify trace-id in either decimal (integer) or hexadecimal (X'trace-id') format.
INSTANCE integer
Specifies that a wait or an abend is to occur when the TRACEID option is encountered a specified number of times. If INSTANCE is not specified, a wait or abend occurs each time that the trace ID is encountered.

integer is the number of times that a trace ID is to be encountered before a wait or an abend occurs.

END
Ends DIAGNOSE processing.