Issuing Db2 commands

Use the command Db2® to execute any Db2 command during your Online Monitor session. You can enter this command on the command line of any Online Monitor panel.

The command syntax is:
Figure 1. Syntax of the Db2 command
Read syntax diagramSkip visual syntax diagramDB2command text
The Db2 command accepts the following parameter:
command text
The Db2 command you want to execute.
For example:
DB2 DISPLAY THREAD(*)
Type DB2 and the command text on the command line and press Enter. The Db2 Command Output window is overlaid on the current panel, where you can view the Db2 command output. An example of the Db2 Command Output window is shown in Figure 2.
Figure 2. Db2 Command Output window
                                                                ROW 1 TO 5 OF 5

 PMO1DLOC           DSN1 V10        GROUP001 MEMBER01


   DGOMCDCO                 DB2 Command Output         ROW 1 TO 12 OF 12
                                                                          ---
                                                                          s 2
_  DSNV401I _ DISPLAY THREAD REPORT FOLLOWS -                             N/P
_  DSNV402I _ ACTIVE THREADS -
_  NAME     ST A   REQ ID           AUTHID   PLAN     ASID TOKEN          N/P
_  DB2CALL  T        3 USER030      USER030  DB2PMOM  002B    25          N/P

_  DB2CALL  T        5 USER001      USER001  DB2PMOM  002E    10          N/P
-  DB2CALL  T  *     6 USER023      USER023  DB2PMOM  0031    10
   DB2CALL  T       10 USER027      USER027  DB2PMOM  0082    20
   DB2CALL  T        5 USER040      USER040  DB2PMOM  0027    15
   DB2CALL  T       50 USER009      USER009  DB2PMOM  002D    15
   DB2CALL  T        4 USER009      USER009  DB2PMOM  002D    22
   DISPLAY ACTIVE REPORT COMPLETE
   DSN9022I _ DSNVDT '-DISPLAY THREAD' NORMAL COMPLETION
   ************************** Bottom of data ***************************

   Command ===> ________________________________________________________
    F1=Help    F2=Split   F3=Exit    F7=Up      F8=Down    F9=Swap
   F12=Cancel F16=Look   F17=Collect


Command ===> DB2 DISPLAY THREAD(*)
 F1=Help      F2=Split     F3=Exit      F5=Auto      F6=History   F7=Up
 F8=Down      F9=Swap     F10=Qualify  F11=Sort     F12=Cancel   F16=Look
F17=Collect  F19=Left     F20=Right    F22=Purge
If you issue the command Db2 without any parameters, the Db2 Command window is displayed.
Figure 3. Db2 Command window
 DGOMCCMD                     DB2 Command

 Enter DB2 Command below:

 START TRACE(MON)____________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________


 Place cursor on choice and press Enter to retrieve command

 => start trace(perfm) class(6)
 => display thread(*)
 => display trace
 =>
 =>
 =>
 =>
 =>
 =>
 =>

 Command ===> ______________________________________________________________
  F1=Help      F2=Split     F3=Exit      F9=Swap     F12=Cancel   F16=Look
 F17=Collect

This window displays command lines on which you can issue Db2 commands. The window shows a list of the last ten Db2 commands that you entered.

You can retrieve a command that is stored in the list by positioning the cursor under the command and pressing Enter. Then, the command is shown on the command line, where you can edit and then submit the command by pressing Enter again.

If a new or modified command is submitted, the command is added to the top of the list. If the command was not edited before submission, or the command was not submitted at all, the list is not updated.
Note: You cannot abbreviate the command Db2.