Viewing the Program Source - IBM-ILE

The Display Module Source display shows the source of an ILE program object one module at a time. The source of an ILE module object can be shown if the module object was compiled using one of the following debug view options:

  • DBGVIEW(*SOURCE)
  • DBGVIEW(*COPY) - ILE RPG only
  • DBGVIEW(*LIST)
  • DBGVIEW(*ALL)

The source of an OPM program can be shown if the following conditions are met:

  1. The OPM program was compiled with OPTION(*LSTDBG).
  2. The ILE debug environment is set to accept OPM programs; that is the value of OPMSRC is *YES. (The system default is OPMSRC(*NO).)

Once you have displayed a view of a module, you may want to display a different module or see a different view of the same module (if you created the module with several different views). The ILE source debugger remembers that the last position in which the module is displayed, and displays it in the same position when a module is redisplayed. Lines that have breakpoints set are highlighted. When a breakpoint, step, or message causes the program to stop and the display to be shown, the statement where the breakpoint occurred is highlighted.

Displaying Other Modules in Your Program
You may want to set some debug options in other modules of your program. You can do this by changing the module that is shown on the Display Module Source display to specify the preferred module.

You can change the module that is shown on the Display Module Source display by using:

  • The Work with Module list display
  • The Display Module debug command

If you use this option with an ILE program object, the entry module with a root source, COPY, or listing view is shown (if it exists). Otherwise the first module object bound to the program object with debug data is shown. If you use this option with an OPM program object, then the source or listing view is shown (if available).

Example

This example shows you how to change from the module shown on the Display Module Source display to another module in the same program using Display Module debug command.

  1. While in a debug session, type DSPMODSRC and press Enter. The Display Module Source display is shown.
  2. On the debug command line, type: display module T1520IC2 The module T1520IC2 is displayed.

Displaying a Different View of a Module
Several different views of a module are available depending on the values you specify when you create the module. They are:

  • Root source view
  • Include source view
  • Listing view

Example

This example shows you how to change the view of the module shown on the Display Module Source display.

  1. To change the view of the module on the Display Module Source display type DSPMODSRC, and press Enter. The Display Module Source display is shown.
  2. Press F15 (Select view). The Select View window is as shown:
  3. change the view of the module shown on the Display Module Source display

    The current view is listed at the top of the window, and the other views that are available are shown below. Each module in a program can have a different set of views available, depending on the debug options used to create it.

  4. Type a 1 next to the include view, and press Enter. The Display Module Source display appears showing the module with an include source view. The source of the include view will be shown at a statement position that is equivalent to the statement position in the current view.

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

IBM-ILE Topics