× 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.



Excellent summary Charles.


Jon P.

On Jul 13, 2023, at 12:55 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

DBGVIEW(*STMT) just includes "statement numbers" no actual code
hasn't been useful in 30 years...

DBGVIEW(*SOURCE) links the compiled object to the source file...
Useful if you're debugging on the DEV system you compiled the object on.

DBGVIEW(*LIST) embeds a copy of the source listing into the compiled object.
Useful if you're debugging on a system other than where the object was
compiled.
may or may not include /INCLUDEs depending on options *SHOWCPY, *EXPDDS

DBGVIEW(*COPY) embeds a copy of the source with all expansions
same as DBGVIEW(*LIST) with OPTION(*SHOWCPY *EXPDDS)

DBGVIEW(*ALL) includes all the above
If the source is available, you can use it. Otherwise you can use the
embedded *LIST or *COPY

option(*SRCSTMT) controls statement numbers used by the debugger and
exception messages.
Without it, the statement number starts at 1 and goes ever upwards.
With it, the statement numbers are calculated = source_ID * 1000000 +
source_SEU_sequence_number
Since the main source has an ID of 0, you get statement numbers for the
main source that match the line numbers in that source.

In other words, when a program fails with an EXCEPTION ON LINE 4000.
With *SRCSTMT, you look at that line in the source. Without it, you'll
need to find that line# in the compile listing to see what line of code it
matches up to.

My defaults are option(*SRCSTMT) and DBGVIEW(*ALL). Even though I can't
debug on the system where we compile objects, so I always end up using the
*LISTING view.

Having said all that...I'll note that with the RDi debugger, if the
DBGVIEW(*SOURCE) is specified, but the source isn't there, you get an
option to use the list view or point the debugger to the correct source.
Even if it's on a different machine (or even local).


HTH,
Charles


On Wed, Jul 12, 2023 at 5:56 PM Javier Sanchez <
javiersanchezbarquero@xxxxxxxxx> wrote:

In all my years of experience, one thing that has always called my
attention, but have never stopped to find out, is that when I compile a
program with DBGVIEW(*SOURCE) and the source is moved, most of the time
when debugging I get "Source is not available".

When I get Turnover move a *PGM object to a remote system and it does not
take the source with it, when I debug I can debug it, but with an initial
warning that the source is not available, and even so, I am able to debug.

What are the actual compilation parameters that make it possible to debug
with the actual source code lines? Is it *SRCSTMT in the option keyword or
parameter?

I always compile with *SRCSTMT and DBGVIEW(*SOURCE) but if I do it alone, I
don't get that result. I mean if I take my compiled object, put it in a
save file and ftp it to a remote system, that seems to not work with me. I
do not get the embedded source.

Would appreciate your comments.

TIA

JS
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



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.