Originally posted by ssmith001
I have a procedure ...I use WHENEVER SQLERROR EXIT SQL.SQLCODE which works great
Not in a procedure you don't. Maybe you could explain what you are trying to do more clearly with examples. (and not all 40 queries)