IBM AS/400 Frozen Dessert Maker User Manual


 
Sample Source for Debug Examples
EQUATE shorthand-name definition
on the debug command line.
shorthand-name
is the name that you want to equate
with a field, expression, or debug command, and
definition
is the field, expression,
or debug command that you are equating with the name.
For example, to define a shorthand name called
DC
which displays the contents of
a field called
COUNTER
, type:
EQUATE DC EVAL COUNTER
on the debug command line. Now, each time
DC
is typed on the debug command
line, the command EVAL
COUNTER
is performed.
The maximum number of characters that can be typed in an EQUATE command is
144. If a definition is not supplied and a previous EQUATE command defined the
name, the previous definition is removed. If the name was not previously defined,
an error message is shown.
To see the names that have been defined with the EQUATE debug command for a
debug session, type:
DISPLAY EQUATE
on the debug command line. A list of the active names is shown on the Evaluate
Expression display.
Source Debug National Language Support for ILE RPG
You should be aware of the following conditions that exist when you are working
with source debug National Language Support for ILE RPG
When a view is displayed on the Display Module Source display, the source
debugger converts all data to the Coded Character Set Identifier (CCSID) of the
debug job.
When assigning literals to fields, the source debugger will not perform CCSID
conversion on quoted literals (for example, 'abc'). Also, quoted literals are
case sensitive.
See the chapter on debugging in
ILE Concepts
for more information on NLS
restrictions.
Sample Source for Debug Examples
Figure 105 on page 212 shows the source for the main procedure of the program
DEBUGEX. Most of the examples and screens shown in this chapter are based on
this source. Figure 106 on page 215 and Figure 107 on page 216 show the
source for the called program RPGPGM and procedure cproc respectively.
The program DEBUGEX is designed to show the different aspects of the ILE
source debugger and ILE RPG formatted dumps. The sample dumps are provided
in the next chapter.
The following steps describe how the program DEBUGEX was created for use in
these examples:
1. To create the module DBGEX using the source in Figure 105 on page 212,
type:
Chapter 11. Debugging Programs 211