ON ERROR - Debug

Hi,

I’m trying to debug a Program that contains a ON ERROR statement, but in debug mode when a error occurs the debug doesn’t go to the ON ERROR statement.

And i need to debug that part of the program.

PS: For Debug I’m doing the instruction “MOVE 6173 to *ERROR-NR”

Can anyone help me? Or it’s a issue that should be posted at servline24?

Hi PNSimoes,

I tried it out with NAT414 on MF and it does work. What environment are you using in ?

Aldo

Hi Aldo,

I’m using SPoD 6.3.2 on XP and Natural 4.2.3 on Mainframe Z/OS. And the debug that i’m doing is on the SPoD side.

Did you try PF11 instead of PF7 ? With NAT625 on WIN2000 and NAT414 on z/OS PF11 does the job whereas PF7 doesn’t.

Aldo

Yes. And when I do the PF11 at MOVE statement, it gives me, imediatelly, the NAT6173 Error message instead of going to the ON ERROR statement.

Hi PNSimones
I run following program in SPoD Debugger of Natural Studio:
:


MOVE 111 TO *ERROR-NR
ON ERROR
  WRITE 'error' *ERROR-NR 'OCCURED IN PGM' *PROGRAM
END-ERROR
END

After starting the program in debug mode it stops initially on line 0010. If I press PF11 te error window for NAT111 pops up. I click OK and press PF11 again and the debugger continues on line 0030 in ON ERROR.
I tested with NDV223SP4 and Natural Studio V633

Can you test this in your environment if it behaves the same?