Sign in

docs RPG Guide

Special names for debugging

Special names for debugging

Several names are available while a program or procedure is being debugged.

_QRNU_DSI_name : This variable allows you to see or change the current index of a multiple-occurrence data structure. For example, for data structure MYDS, evaluate _QRNU_DSI_MYDS in the debugger to work with the current index.

See [Displaying Data Structures](/doc/en/docs/rpg-guide/dbgdspds/).

_QRNU_NULL_name : This variable allows you to see or change the null indicator for a variable. For example, for null-capable field MYFLD, evaluate _QRNU_NULL_MYFLD in the debugger to work with the null indicator of the field. For null-capable subfield MYDS(i).SUBDS(j).MYSUBF, evaluate _QRNU_NULL_MYDS(i).SUBDS(j).MYSUBF to work with the null indicator of the subfield.

See [Displaying Null-Capable Fields](/doc/en/docs/rpg-guide/dispnull/).

_QRNU_RETVAL : If Control keyword DEBUG(*RETVAL) is specified, this variable allows you to see or change the value to be returned from the current procedure.

\_QRNU\_RETVAL has the same type as the value returned from the procedure.

* If the procedure returns a data structure, \_QRNU\_RETVAL is also a data structure.
* If the procedure returns an array, \_QRNU\_RETVAL is also an array.

Set a breakpoint on the last statement of the procedure to view or change the value of this variable.

* In free-form code, set the breakpoint on the END-PROC statement.
* In fixed-form code, set the breakpoint on the Procedure-End specification.

See [Displaying the Return Value from a Procedure](/doc/en/docs/rpg-guide/dbgretval/).

_QRNU_TABI_name : This variable allows you to see or change the current index of a table. For example, for table TAB01, evaluate _QRNU_TABI_TAB01 in the debugger to work with the current index.

See [Displaying the Contents of a Table](/doc/en/docs/rpg-guide/dbgdsptab/).

_QRNU_XMLSAX : If Control keyword DEBUG(*XMLSAX) is specified, this variable allows you to see the names associated with the events for the XML-SAX operation.

See [Debugging an XML-SAX Handling Procedure](/doc/en/docs/rpg-guide/dbgxmlsax/).