On 12/08/2010, at 7:34 PM, David FOXWELL wrote:
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.
DEBUG(*ALL) gives you all debug views so you have *SOURCE, *LIST and  
*COPY available. *LIST view effectively embeds the compiler listing  
inside the module object so it is not possible to have the debug view  
out of sync with the module. The messages you see relate to the source  
view. What I suspect is happening is that *SOURCE view is the first  
view selected by the debugger. There is a function key (which one  
escapes me at present) in debug that can select from the available  
views so if you select *LIST view you should be able to debug quite  
happily.
Note that *COPY is just a fancy *SOURCE view that includes the copy  
members.
For in-house code *LIST is probably the best view. It means debugging  
can be performed wherever the *PGM object is located. If you have the  
source on the production system then *SOURCE or *COPY will work well  
too.
For code being shipped (i.e., vendors) then *SOURCE or *COPY is  
probably better if only to avoid mistakenly shipping the source in the  
*LIST view if you forget to strip debug data out before distribution.  
Of course, with the new releases you can now encrypt the debug listing  
so it might be worth shipping with encrypted *LIST to allow remote  
debug on a customer machine.
Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         OS/400, i5/OS Technical Specialists
   
http://www.flybynight.com.au/
   Phone: +61 2 6657 8251   Mobile: +61 0411 091 400        /"\
   Fax:   +61 2 6657 8251                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------
 
As an Amazon Associate we earn from qualifying purchases.