DEBUG{(*INPUT | *DUMP | *XMLSAX | *NO | *YES)}

The DEBUG keyword controls what debugging aids are generated into the module.

When the DEBUG keyword is specified with one or more of the *INPUT, DUMP or *XMLSAX parameters, you can choose exactly which debugging aids are to be generated into the module. When the DEBUG keyword is specified with *YES or *NO, no other parameters can be specified.

*INPUT
All externally described input fields will be read during input operations even if they are not used in the program. Normally, externally described input fields are only read during input operations if the field is otherwise used within the program.
*DUMP
DUMP operations are performed.

Note: You can force a DUMP operation to be performned by specifying operation extender A on the DEBUG operation code. This operation extender means that a dump is always performed, regardless of the value of the DEBUG keyword.

*XMLSAX
An array with the name _QRNU_XMLSAX will be generated into the module if it has a debug view (if it is compiled with a value for the DBGVIEW parameter other than *NONE). The values of the array will be the names of the *XML special words, without the "*XML_" prefix. For example, if *XML_START_DOCUMENT has the value 1, _QRNU_XMLSAX(1) will have the value "START_DOCUMENT".
Sample debug session:
> EVAL event
  EVENT = 2
> EVAL _QRNU_XMLSAX(event)
  _QRNU_XMLSAX(EVENT) = 'END_DOCUMENT   '

Specifying the DEBUG keyword with *NO indicates that no debugging aids should be generated into the module. This is the same as omitting the DEBUG keyword entirely. No other parameters can be specified when *NO is specified.

Specifying the DEBUG keyword with *YES or with no parameters is the same as specifying DEBUG(*INPUT : *DUMP). No other parameters can be specified when *YES is specified. The value *YES is retained for compatibility; it is preferable to specify the more granular values *INPUT, *DUMP and *XMLSAX.

Examples:
  * 1. All of the debugging aids are available
 H DEBUG(*INPUT : *DUMP : *XMLSAX)
* 2. None of the debugging aids are available
 H DEBUG(*NO)
* 3. Only the debugging aid related to input fields is available
 H DEBUG(*INPUT)
* 4. The debugging aids related to the DUMP operation and
*    to XML-SAX parsing are available
 H DEBUG(*XMLSAX : *DUMP)
Note: The DEBUG keyword does not control whether the module is created to be debuggable. That is controlled by the DBGVIEW parameter for the CRTBNDRPG or CRTRPGMOD command. The DEBUG keyword controls additional debugging aids.