Debugging RPGLE Program
480 pts.
0
Q:
Debugging RPGLE Program
I have compiled the RPGLE source with DBGVIEW Option as *STMT. How to debug this program?
ASKED: Nov 12 2009  10:37 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
6365 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
STRDBG xxxxxx
Call xxxxxx
where xxxxxx is the program name
Last Answered: Nov 12 2009  1:55 PM GMT by CharlieBrowne   6365 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Rajeshece   480 pts.  |   Nov 12 2009  1:30PM GMT

One More Thing: What is the purpose of this Option?

 

Teandy   3165 pts.  |   Nov 12 2009  4:11PM GMT

This is straight from the help panel of the CRTBNDRPG command.

Debugging views (DBGVIEW) - Help

Specifies which level of debugging is available for the
compiled program object, and which source views are
available for source-level debugging.

*STMT
Allows the program object to be debugged using the
Line Numbers or Statement Numbers of the compiler
listing. Line Numbers are shown on the left-most
column of the source section of the compiler listing
when OPTION(*NOSRCSTMT) is specified. Statement
Numbers are shown on the right-most column of the
source section of the compiler listing when
OPTION(*SRCSTMT) is specified.

*SOURCE
Generates the source view for debugging the compiled
program object. This view is not available if the
root source member is a DDM file. Also, if changes
are made to any source members after the compile and
before attempting to debug the program, the views for
those source members may not be usable.

*LIST
Generates the listing view for debugging the compiled
program object. The information contained in the
listing view is dependent on whether *SHOWCPY,
*EXPDDS, and *SRCSTMT are specified for the OPTION
parameter.

Note: The listing view will not show any
indentation which you may have requested using the
Indent option.

*COPY
Generates the source and copy views for debugging the
compiled program object. The source view for this
option is the same source view generated for the
*SOURCE option. The copy view is a debug view which
has all the /COPY source members included. These
views are not available if the root source member is a
DDM file. Also, if changes are made to any source
members after the compile and before attempting to
debug the program, the views for those source members
may not be usable.

*ALL
Generates the listing, source and copy views for
debugging the compiled program object. The
information contained in the listing view is dependent
on whether *SHOWCPY, *EXPDDS, and *SRCSTMT are
specified for the OPTION parameter.

*NONE
Disables all of the debug options for debugging the
compiled program object.

 

Maxb   15 pts.  |   Nov 12 2009  10:58PM GMT

One thing more if you are using a library that is production you must use UPDPROD(*YES).

 

TomLiotta   7740 pts.  |   Nov 13 2009  6:11AM GMT

The purpose is to debug by statement numbers. It’s rarely used except in some pretty limited circumstances. You might find much more use for it if you wrote some of your debug routines using the debug APIs. About the only way to demonstrate is to STRDBG and then run a BR 1 debug command before exiting out of debug. Then call the program to see what happens.

You can step through with <F10> as usual. You can run debug EVAL commands or any others.

Of course, you will need a listing to keep track, and the nicer bits like pressing <F11> while the cursor is on a variable aren’t possible. But it allows you to debug without needing to link to source nor shipping a program with all of its details stored inside for the world to uncover.

Tom

 

Teandy   3165 pts.  |   Nov 17 2009  8:52PM GMT

IMHO, you would be MUCH better off to recompile the program with *LIST or *ALL.

 
0