What is the purpose of the WHENEVER statement?

A54. The WHENEVER statement is coded once in the host program to control program actions depending on the SQL-CODE returned by each sql statement within the program.

Showing Answers 1 - 1 of 1 Answers

DB2MAN

  • Jul 1st, 2008
 

IT IS USED TO PERFORM THE SPECIFIC USER DIFINED FUCNTION FOR THE PARTICULAR SQL RETURN CODE..
For Ex ,
Whenever sqlcode = 100
  Display "whenever condition returncode is 100"
whenever sqlcode = 811
 Display 'whenever condition returns 811 and program may aben due to mltiple select"

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions