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



Hmmm - I must play with your code because in my trial it didn't trigger.

I was doing everything within a single program (and no subprocs) could that make a difference.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jul 19, 2019, at 3:42 PM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:

On 2019-07-18 5:45 PM, Charles Wilt wrote:
...
Question: if we set a watch break point on the DS being corrupted, will the
the job actually break? Or do watch break points only apply to the change
made by code in the module where the variable is declared?

In my experience, a watch point is hit in any module that is debuggable.

If the module isn't debuggable, a message pops up saying where the module was modified.

Test:

Program WATCH1:
dcl-ds ds;
sub1 char(5) inz('abcde');
sub2 char(5) inz('fghij');
end-ds;
dcl-pr watch2 extpgm;
parm char(5);
end-pr;
watch2 (sub1);
return;
Program WATCH2:
dcl-pi *n;
parm char(5);
end-pi;
dcl-pr watch3 extpgm;
parm char(5);
end-pr;
watch3 (parm);
return;
Program WATCH3:
dcl-pi *n;
parm char(10);
end-pi;
parm = 'helloworld';
return;
Compile all the programs with debug. In WATCH1 set a watch point on SUB2 and then run the program. A watchpoint will fire on the RETURN statement in WATCH3 after it modified the storage.

Now, compile WATCH3 with DBGVIEW(*NONE). Do the same test. Here's the message that pops up:
Message ID . . . . . . : CPF9C64 Severity . . . . . . . :
Message type . . . . . : Diagnostic
Date sent . . . . . . : 19/07/19 Time sent . . . . . . :

Message . . . . : Watch number 1 at statement 5, variable: SUB2
Cause . . . . . : The following watch information is available.
Watch Number 1, Watch variable: SUB2.
Stopped program:

Program WATCH3 Library BMORRIS statement 5
Module WATCH3 Procedure WATCH3
Interrupting program:
Job 228132/BMORRIS/QPADEV000B

Program WATCH3 Library BMORRIS statement 4
Module WATCH3 Procedure WATCH3

--
Barbara

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.