Application Development Guide

Table Function Error Processing

The error processing model for table function calls is as follows:

  1. If FIRST call fails, no further calls are made.
  2. If FIRST call succeeds, the nested OPEN, FETCH, and CLOSE calls are made, and the FINAL call is always made.
  3. If OPEN call fails, no FETCH or CLOSE call is made.
  4. If OPEN call succeeds, then FETCH and CLOSE calls are made.
  5. If a FETCH call fails, no further FETCH calls are made, but the CLOSE call is made.
Note:This model describes the ordinary error processing for scalar UDFs. In the event of a system failure or communication problem, a call indicated by the error processing model may not be made. For example, for a FENCED UDF, if the db2udf fenced process is somehow prematurely terminated, DB2 cannot make the indicated calls.


[ Top of Page | Previous Page | Next Page ]