Setting a Watch Condition - IBM - RPG

In this example, you watch a variable SALARY in program MYLIB/PAYROLL. To set the watch condition, type:

WATCH SALARY

on a debug line, accepting the default value for the watch-length.

If the value of the variable SALARY changes subsequently, the application stops and the Display Module Source display is shown, as illustrated

Example of Message Stating WATCH was Successfully Set

Example of Message Stating WATCH was Successfully Set

  • The line number of the statement where the change to the watch variable was detected is highlighted. This is typically the first executable line following the statement that changed the variable.
  • A message indicates that the watch condition was satisfied.

Note: If a text view is not available, a blank Display Module Source display is shown, with the same message as above in the message area.
The following programs cannot be added to the ILE debug environment:

  1. ILE programs without debug data
  2. OPM programs with non-source debug data only
  3. OPM programs without debug data

In the first two cases, the stopped statement number is passed. In the third case, the stopped MI instruction is passed. The information is displayed at the bottom of a blank Display Module Source display as shown below. Instead of the line number, the statement or the instruction number is given.

Example of a Display Module Source Panel

Example of a Display Module Source Panel


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

IBM - RPG Topics