JayC
New User
Joined: 27 Sep 2008 Posts: 70
|
|
|
|
I have a db2 program that has the following coded in the very beginning of the PROCEDURE DIVISION :
Code: |
EXEC SQL WHENEVER SQLWARNING
GO TO 0000-PROGRAM-EXIT
END-EXEC
EXEC SQL WHENEVER SQLERROR
GO TO 0000-PROGRAM-EXIT
END-EXEC
|
I read from the manual that "WHENEVER" can be used as a exception checking routine. But we usually place this after a particular SQL request, why wold we want to place it in the beginning - before and SQL query is executed ? |
|