How to skip UPDATE statement in debug mode

In debug mode we come across UPDATE statement inside a query, it says Update not possible message.
Please tell me how to overcome such messages. :frowning:

Thanks in advance.

In particular, what error message are you getting?

What do you mean “inside a query”?

Do you get the message when running without debug?

steve

For example:-
I have set the test mode ON and set the breakpoint at Select statement containing UPDATE. Execute the program in Online mode, when reached the breakpoint go step by step (F2 function key) and hold for 1 min before UPDATE statement and then press F2 over UPDATE then we get the message as “Update not possible after automatic COMMIT”.

Sounds like your working on a Natural/DB2 project and as such screen IO is acting as an automatic COMMIT. Therefore your actual DEBUG screen IO is the culprit. What I used to do is set breaks in such a way as to stop before the update then use GO rather than STEP and have it stop again after the UPDATE. What I cannot recall is this: did I have to have my breaks either side of the SELECT of was either side of the UPDATE sufficient.

Sorry for replying late!!
Actually you are correct if we place the breakpoint after Update statement, then it will work correctly. Suppose you have placed the break point before Update and do not use F2, instead enter go to avoid the abend:).

If you don’t want to register the updates in the DB2 database when you test with the debugger , you have to put on natural command line : “UPDATE OFF” before beginning your test with the debugger on.