The ILE Source Debugger - IBM - RPG

The ILE source debugger is used to detect errors in and eliminate errors from program objects and service programs. Using debug commands with any ILE program that contains debug data you can:

  • View the program source or change the debug view
  • Set and remove breakpoints and watch conditions
  • Step through a specified number of statements
  • Display or change the value of fields, structures, and arrays
  • Equate a shorthand name with a field, expression, or debug command

Before you can use the source debugger, you must select a debug view when you create a module object or program object using CRTRPGMOD or CRTBNDRPG. After starting the debugger you can set breakpoints and then call the program.

When a program stops because of a breakpoint or a step command, the pertinent module object’s view is shown on the display at the point where the program stopped. At this point you can perform othe actions such as displaying or changing field values.

Note: If your program has been optimized, you can still display fields, but their values may not be reliable. To ensure that the content of fields or data structures contain their correct (current) values, specify the NOOPT keyword on the appropriate Definition specification. To change the optimization level, see “Changing the Optimization Level”.

Debug Commands
Many debug commands are available for use with the ILE source debugger. The debug commands and their parameters are entered on the debug command linedisplayed on the bottom of the Display Module Source and Evaluate Expression displays. These commands can be entered in uppercase, lowercase, or mixed case.

Note: The debug commands entered on the debug command line are not CL commands.

The debug commands are listed below.

debug commands

debug commands

debug commands
The online help for the ILE source debugger describes the debug commands, explains their allowed abbreviations, and provides syntax diagrams for each command. It also provides examples in each of the ILE languages of displaying and changing variables using the source debugger.

Follow these steps to access the online help information for ILE RPG:

  1. Enter STRDBG library-name/program-name where program-name is any ILE program with debug data in library library-name.
  2. Enter DSPMODSRC to show the source view if this screen does not appear following step 1.
  3. Enter PF1 (Help)
  4. Put your cursor on EVAL and press enter to bring up the EVAL command help.
  5. Put your cursor on Expressions and press enter to bring up help for expressions.
  6. Put your cursor on RPG language and press enter to bring up RPG language examples.
  7. From the help panel which appears, you can select a number of topics pertaining to RPG, such as displaying variables, displaying table, and displaying multiple-occurrence data structures.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM - RPG Topics