The following limitations apply when debugging your applications:
- Character mode display limit is 1024 bytes. Hex mode display limit
is 4096 bytes. If you want to view strings longer than 1024 bytes,
you can view the variable from the memory view when you monitor the
expression in memory using the Raw Hex and Char split pane rendering.
In the case of structures, limit the view or monitor expression only
to the element in the structure that is of interest. See Viewing memory in different formats in the Memory Rendering view for more information about using the
memory view.
The following limits apply when using the Debugger editor
*SOURCE view while debugging SQL procedures:
- The Debugger editor must be used. Make sure that your debug preferences
are set to always using the Debugger editor. To set debug preferences,
select . Select the Always use Debugger Editor while
debugging check box.
- Step over: When stepping through the *SOURCE view, the
current line may stay on the same SQL statement for several steps,
if that SQL statement requires multiple lines of generated C code
to implement.
- Monitoring variables: The Monitor Expression pop-up
menu item in the Debugger editor does not work for SQL variables and
parameters. To monitor an SQL variable, you have the following options:
- The system generates internal structures when creating the *SOURCE
view. You can find these structures in the Variables view and evaluate
them as monitored expressions.
- You can use the Monitor Expression dialog
in the Monitors view, typing the variable name into it according to
the following rules:
SQL variables and parameters are generated
as part of a structure. The structure name must be used when evaluating
a variable while debugging. Variables are qualified by the current
label name. Parameters are qualified by the procedure or function
name. In addition, all variables and parameters must be evaluated
as an uppercase name. It is highly recommended that you specify a
label name for each compound statement or FOR statement.
If you do not specify this, the system will generate one for you and
evaluating variables will be very difficult.
For example, in the following stored procedure code,
CREATE PROCEDURE MYLIB / ADDITEM ( IN ITEMNUMBER CHARACTER ( 3 ) )
LANGUAGE SQL
SET OPTION DBGVIEW = * SOURCE
DECLARE TOTALNUM INTEGER;
....
UPDATE INVENTORY SET ORDER_NUMBER = ORDER_NUMBER + 1 WHERE ITEM_NUMBER = ITEMNUMBER;
...
END;
You can evaluate the ADDITEM structure.
To evaluate an individual variable, such as the parameter, ITEMNUMBER,
you need to evaluate ADDITEM.ITEMNUMBER.