END EXCEPTION W/ RESUME - odd behaviour
Posted in 1996
This is a retry. Apparently the last one didn't go through - and to think I thought you were all either ignoring me or unkowledgable. cheers j. } } We have a situation... } } A flock of rows which are either insert or updates into a destination table. } } Our strategy: } } ON EXCEPTION IN (239) } UPDATE { dest table using pgm vars } } } END EXCEPTION WITH RESUME; } } FOREACH { read source table into pgm vars } } } INSERT { into dest table using pgm vars } } } END FOREACH } } Works like a dream. The first row already exists so it invokes the exception } which updates it. BUT, then the exception resumes AFTER the END FOREACH. } My reading of the documentation does not jive with this. According to the 7.1 } manual the RESUME picks up with the next iteration of the FOREACH. Is this a } pheature of Online 5.0 that was fixed in 7.1? Or should we look at the code } and try to fix it. In other words do we opt for a different strategy or } fix our existing one? } } cheers } j. } } (p.s. we are now doing a DELETE WHERE EXISTS followed by an insert). Just } idle curiosity now. } _____________________________________________________________________________ Jack Parker - Hewlett Packard, DMD/IS Boise, Idaho, USA jparker@boi.hp.com Currently on loan to PLD/PE _____________________________________________________________________________ If anything can go wrong, fix it. To hell with Murphy. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________