I have somehow a special problem. Lately I had to write some user defined functions (sql based functions written in PLSQL, not external functions).
The function itself was quite easy. It contained just a lookup for an input parameter in a special table. If the lookup returned a record, the value '1' is returned. Otherwise the value '0'.
So, there will be returned every time a value.
My problem now is, that if I use the UDF in an UNLOAD-Statement, the PUNCH-file contains the additional byte for the indicator.
Is there a way to define a UDF in such a way, that DB2 recognizes it as a function 'that can never return a NULL value'?