Problem:
We are having problems with Breakpoints being lost after a re-compile. There is no error message and the program continues on past where we had set a Breakpoint. This is happening for us in both Mainframe Express and Net Express. If we use Debug>Breakpoint>Show All in Mainframe Express or Animate>Breakpoint>Show All in Net Express, there are Breakpoints listed, but they are not being honored.
Resolution:
Breakpoints may not be saved correctly after a source code change and re-compile. This is true for the Mainframe Express .DBS file and the Next Express .~DS file used by Mainframe v3.1 and Net Express V5.0.
The following program and the instructions following it illustrate what can happen:
Identification Division.
Program-Id. LORINCE.
Environment Division.
Data Division.
Working-Storage Section.
1 A Pic 9.
1 B Pic 9.
Procedure Division.
P0.
Display ' Starting P0 '
Perform P1
Display ' Ending Program '
Stop Run.
P1.
Display ' Starting P1 '
Display ' A B = ' A B
Perform P2
Display ' A B = ' A B
Perform P4
Display ' A B = ' A B
Perform P6
Display ' A B = ' A B
Perform P8
Display ' A B = ' A B
Perform P10
Display ' A B = ' A B
Perform P11
Display ' A B = ' A B.
P2.
Display ' Starting P2 '
Perform P3
Move 0 to A.
P3.
Display ' Starting P3 '
Move 0 to B.
P4.
Display ' Starting P4 '
Perform P5
Move 0 to A.
P5.
Display ' Starting P5 '
Move 1 to B.
P6.
Display ' Starting P6 '
Perform P7
Move 1 to A.
P7.
Display ' Starting P7 '
Move 0 to B.
P8.
Display ' Starting P8 '
Perform P9
Move 1 to A.
P9.
Display ' Starting P9 '
Move 1 to B.
P10.
Display ' Starting P10 '
Perform P2
Perform P8.
P11.
Display ' Starting P10 '
Perform P6
Perform P4
Perform P2.
For Mainframe Express, start by setting a Breakpoint on the 'PERFORM P6' in paragraph P1. see P1.Jpg
- Go to Debug>Start Debugging>TSO tab,
once in TSO Command Prompt type:
call lorince
- Step thru the first few statements in the
Cobol program, then press F5 (Run)
- When the Breakpoint is encountered,
select Debug>Stop Debugging
- With Lorince.Cbl open in the IDE Editor,
comment out the 'PERFORM P4' in paragraph P1
see P2.Jpg
- Save and re-compile the program
Close the output window if it is not docked
Note: At this point the source actually changes
to show the former Breakpoint on the
PERFORM P6 now on the PERFORM P8
see P3.Jpg
- Go to Debug>Start Debugging>TSO tab,
once in TSO Command Prompt type:
call lorince
- Step thru the first few statements in the
Cobol program, then press F5 (Run)
- Notice that the Breakpoint has moved and
is honored on the wrong line
see P4.Jpg
For Net Express the same is true if one re-compiles after making a source code change as described above and then Animates the program.
For both products, this means that a Breakpoint previously set is still honored but at an incorrect location. This can lead to confusing testing results. The recommended method is to delete the .DBS or .~DS after a re-compile and set new Breakpoints.
Attachments:
#EnterpriseDeveloper
#MFDS
#ServerExpress
#COBOL
#Enterprise
#netexpress
#MainframeExpressandMFE