Viewing SQL text for an exception
You can view the SQL text for an exception.
Procedure
To view the SQL text for an exception
- On the IBM DB2 Query Monitor for z/OS panel (the main menu), specify option 5, and press Enter.
On the Display Exceptions panel, specify the S or SF line command next to the exception for which you want to view the SQL text.
If you specified the S line command, the SQL text is displayed without any extra formatting:
Figure 1. Display SQL Statement Text panel YYYY/MM/DD HH:MM:SS ----- Display SQL Statement Text ---- Row N of N Option ===> ________________________________________________ Scroll ===> PAGE DB2 SSID: DB01 Plan: PLAN0001 DBRM: ADBMAIN Coll: ADBL Cursor: Section: 0 ------------------------------------------------------------------------ DECLARE C1 SENSITIVE DYNAMIC SCROLL CURSOR FOR SELECT ROWID , COL2 FROM QMTSTB01 . BILLION_FETCH ***************************** Bottom of Data *********************************
If you specified the SF line command, the formatted SQL text is displayed:Figure 2. Display SQL Statement Text panel YYYY/MM/DD HH:MM:SS ---- Display SQL Statement Text ---- Row 1 of 4 Option ===> ________________________________________________ Scroll ===> CSR DB2 SSID: DB01 Plan: PLAN0001 DBRM: ADBMAIN Coll: ADBL Cursor: N/A Section: 0 ------------------------------------------------------------------------ DECLARE C1 SENSITIVE DYNAMIC SCROLL CURSOR FOR SELECT ROWID, COL2 FROM QMTSTB01.BILLION_FETCH ***************************** Bottom of Data **********************************
Tip:On this panel, you can use the VIEW command to open an ISPF VIEW session where you can edit and save the SQL text. See Viewing SQL text.