× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In further response to this, I looked at the help text on DBGVIEW of the command, as well as the debugging section of the ILE RPG Programmer's Guide. I came up with these conclusions, some new enough to me that I thought it worth putting here.

In ILE, the options are *ALL, *STMT (default), *SOURCE, *COPY, *LIST, and *NONE (not much use). I've wondered about the usefulness of *STMT, because I don't see anything in the debug screen when set to that. But now I think I know what it's about. Here goes! I used DMPOBJ to see what the result of each option was.

*STMT - you can set breakpoints and display variables. Big deal! Wait - you have to have a listing on paper in front of you. Then you do the old-school way of the commands like ADDBKP/RMVBKP and DSPPGMVAR, etc. Used to do that - hated it! Seems this is present when any of the other options are selected.
*SOURCE - puts a reference to the source into the program object. If source still exists, it will be displayed. If it has been changed, you'll see a message, and sometimes stepping through will stop on a comment. With SQL-types, this ends up the same as *ALL.
*COPY - puts references to source and all /copy members into the program object. Similar to *SOURCE, with /copy expanded. Check help text for what will be available.
*LIST - the compile listing is included in the program object. This will be the source that was used to create the program, so it is the most useful option, in my opinion. If you are stepping through and end up on a comment or the wrong statement, try using F15 to select the listing view.
*ALL - includes *SOURCE, *COPY, and *LIST.

So if my conclusions are right, the best way to be sure you will be in the right place in a debug session is to use *LIST or *ALL - the overall object size is very close with the 2 options, so I'm inclined to use *ALL. And with this option, you don't need to have the source around. This would let you put a debuggable object on a production machine for troubleshooting without needing to bring source over. I use that with customers sometimes.

HTH
Vern

On 8/12/2010 4:34 AM, David FOXWELL wrote:
-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de rob@xxxxxxxxx
Aren't there any issues with debugging? Aren't the source
files needed?
The source files are not needed. See CRTBNDRPG DBGVIEW(*LIST)
All our programs are compiled thus :
CRTRPGMOD MODULE(&OBJLIB/&PGM) SRCFILE(&SRCLIB/&SRCF)
DBGVIEW(*ALL)

Then CRTPGM, etc.

I needed to debug a pgm in a development library. The developer had compiled in a development source file QRPGLESRC, then copied to another source file used for the deployment, deleting the original in QRPGLESRC. When I do STRDBG, a source member shows up with the message<File QRPGLESRC not available> and<File source modified>. I don't know what source member is being displayed on the screen, but it doesn't seem to be usable for debugging.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.