Files
doc-exports/docs/dws/tool/DWS_DS_624.html
Lu, Huayi 346ac31da9 DWS TG 8.1.3.200 VERSION
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-08-28 09:20:17 +00:00

64 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0000001233800681"></a><a name="EN-US_TOPIC_0000001233800681"></a>
<h1 class="topictitle1">Checking Debugging Information</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p54315131">When you use Data Studio, you can examine debugging information through several debugging tabs. This section describes how to check the debugging information:</p>
<ul id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_ul19074136"><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li4745601017151"><a href="#EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section37449496">Operating on Variables</a></li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li113121213202316"><a href="#EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section1351626183918">Viewing Results</a></li></ul>
<div class="section" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section37449496"><a name="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section37449496"></a><a name="en-us_topic_0185264399_section37449496"></a><h4 class="sectiontitle">Operating on Variables</h4><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p29024834">The <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b65122991">Variables</strong> pane is used to monitor information or evaluate values. The <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b1537013416393">Variables</strong> pane can be opened from the minimized window panel. Using this pane, you can evaluate or modify variables or arguments in a PL/SQL function. As you step through the code, the values of some local variables may change.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p648015944518"><span><img id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_image74801934518" src="figure/en-us_image_0000001188202700.png"></span></p>
<div class="note" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_note61302126"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p14848227">The content of the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b42513748">Variables</strong> pane can be copied to the clipboard using <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b56876354163418">Alt</strong>+<strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b13274599163425">K</strong>.</p>
</div></div>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p61855762">You can double-click the corresponding row of the variable and manually change variable values during run-time.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p19830949">Click the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b55336012">Variable</strong>, <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b28262061">Datatype</strong>, or <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b53031964">Value</strong> column in the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b7525633">Variables</strong> pane to sort the values. For example, to change the value of the percentage variable from 5 to 15, double-click the corresponding row in the <strong id="EN-US_TOPIC_0000001233800681__b8309164124316">Variable</strong> pane. The <strong id="EN-US_TOPIC_0000001233800681__b123098434320">Set Variable Value</strong> dialog box will be displayed, which prompts you to input the variable value. Input the variable value and click <strong id="EN-US_TOPIC_0000001233800681__b103092474313">OK</strong>.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p4893306">To set <strong id="EN-US_TOPIC_0000001233800681__b9653125418343">NULL</strong> as a variable value, enter <strong id="EN-US_TOPIC_0000001233800681__b7798311184414">NULL</strong> or <strong id="EN-US_TOPIC_0000001233800681__b1936415164418">null</strong> in the <strong id="EN-US_TOPIC_0000001233800681__b15220122518448">Value</strong> column.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p6685105733115">If the variable is read-only, it will be indicated by <span><img id="EN-US_TOPIC_0000001233800681__image11342123454414" src="figure/en-us_image_0000001234042435.jpg"></span> beside the corresponding variable.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p10450704">Users cannot update these variables. A variable declared as a constant will not be shown as read-only in the <strong id="EN-US_TOPIC_0000001233800681__b169551559451">Variables</strong> pane. However, while updating it, an error will occur.</p>
<div class="note" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_note48924553"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_ul37667799"><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li3465872">In the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b1988636">Variables</strong> pane, the parameter value will be displayed as <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b1117633114415">NULL</strong>, if the input to the parameter value is string literal 'NULL'.</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li12300244">When the value is set to a variable using Data Studio, then the value of the variable is the same as the value returned by the statement "select expression" executed from <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b44558843171847">gsql</strong>.</li></ul>
</div></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_table43039893194712" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_row47355305194712"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.11.1.3.1.1"><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p51166987194723"><strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b3103430317194">Setting/Displaying Variables</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.11.1.3.1.2"><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p50885316194723"><strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b3075059217194">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_row55623333194712"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.1 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p51302847194723">Setting NULL Values</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.2 "><ol id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_ol59724911257"><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li557912148110">Double-click a variable value in the <strong id="EN-US_TOPIC_0000001233800681__b1673105317479">Variables</strong> pane.<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p17610182561115">A dialog box is displayed.</p>
</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li4235539191111">Set the variable to an empty value.</li></ol>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_row60174080194712"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.1 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p51284837194723">Configuring String Values</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.2 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p60431150194723">Configure the string values as follows:</p>
<ul id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_ul7009439194723"><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li9607368194723">To configure <strong id="EN-US_TOPIC_0000001233800681__b129407446453">abc</strong>, enter <strong id="EN-US_TOPIC_0000001233800681__b77785014518">abc</strong>.</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li19357451194723">To configure <strong id="EN-US_TOPIC_0000001233800681__b10781699461">Master's Degree</strong>, enter <strong id="EN-US_TOPIC_0000001233800681__b1717111910463">Master's Degree</strong>.</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li195471811191220">To set variable as text (<strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b15126121454310">NULL</strong>), configure <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b123971844314">NULL</strong> in the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b243615181749">Variables</strong> pane.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_row6237976194712"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.1 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p18720932194723">Setting Boolean Values</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.2 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p40000543194723">Enclose the boolean values <em id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_i2924453417228">t</em> or<em id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_i6187421517228"> f</em> within single quotes. To set <em id="EN-US_TOPIC_0000001233800681__i1715410586450">t</em> to a boolean variable, enter <em id="EN-US_TOPIC_0000001233800681__i1415412582451">'t'</em> in the <strong id="EN-US_TOPIC_0000001233800681__b1515495812453">Variables</strong> pane.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_row52821450194712"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.1 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p28524206194723">Displaying Variable Value</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.11.1.3.1.2 "><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p28759358194723">If the variable value is <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b127721323154311">NULL</strong> text, it will be displayed as <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b1111157174311">NULL</strong>.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p47806642194723">If the variable value is <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b156211278439">NULL</strong>, it will be displayed as empty.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p47132787194723">If the variable value is a string, for example, <em id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_i28538337434">abc</em>, it will be displayed as <em id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_i6456143864319">abc</em>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section1351626183918"><a name="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_section1351626183918"></a><a name="en-us_topic_0185264399_section1351626183918"></a><h4 class="sectiontitle">Viewing Results</h4><p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p25321017">The <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b10290070">Result</strong> tab displays the output for the PL/SQL debugging session, with the corresponding function/procedure name at the top of the tab. The <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b25501770">Result</strong> tab will appear automatically, only if there is a result for the executed PL/SQL program.</p>
<p id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_p4084284">You can copy the content of the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b52377526">Result</strong> tab, by clicking <span><img id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_image62391565" src="figure/en-us_image_0000001233801001.jpg"></span>. For details, see <a href="DWS_DS_128.html">Working with SQL Terminals</a>.</p>
<div class="note" id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_note63022343"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_ul30330179"><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li4536157">The tool tip in the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b58502189">Result</strong> tab displays a maximum of 10 lines, where each line contains maximum of 80 characters.</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li31884407">If the result of the executed query is NULL, it will be displayed as <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b124841549154413">&lt;NULL&gt;</strong>.</li><li id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_li143685153813">Tab characters (ASCII 009) in table data will not be displayed in the <strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b1983172462512">Results/View Table Data</strong><strong id="EN-US_TOPIC_0000001233800681__en-us_topic_0185264399_b189362035398">/Properties</strong> window. Tab characters will be included correctly when copying/exporting the data. Tool tip will also display the tab characters correctly.</li></ul>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_62.html">Debugging a PL/SQL Function</a></div>
</div>
</div>