×
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.
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
As an Amazon Associate we earn from qualifying purchases.