When a thread suspends, the top stack frame of the thread is automatically selected. When a stack frame is selected, the visible variables in that stack frame are displayed in the Variables view. Complex variables can be expanded to show the elements that make up the variable.
When debugging stored procedures, the SQLCODE (integer) and SQLSTATE (character) variables are always monitored in the Variables view. A value of SQLCODE other than zero (not equal to zero (0)) usually indicates that the SQL code being debugged contains errors. Similarly, a value of SQLSTATE other than '00000' typically means that the code contains errors.
In the Variables view, you can modify the contents of variables and variable objects. For information about changing the contents of variables, see the related task. In addition, you can set the length of variant length variables in the Variables view. To do this, right-click a variant length variable and select Set Length from the pop-up menu. This will open the Set Length dialog box, in which you can modify the length of the variable. When this dialog box opens, the initial value of the variable length is the current length of the variable.