The following limitations apply when debugging your applications:
The following limits apply when using the Debugger editor *SOURCE view while debugging SQL procedures:
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.