Sample user-defined functions

Some sample user-defined functions are provided with DB2®. You can use the functions in your applications just as you would use other user-defined functions, or as examples to help you define your own user-defined functions.

  • To use these functions in your applications: Use the functions only if installation job DSNTEJ2U, which prepares the functions for use, has been run. Because the external programs that implement the logic of the sample functions are written in C and C++, the installation job requires that your site has IBM® C/C++ for z/OS®. For information on installation job DSNTEJ2U, see DB2 Installation Guide.
  • If you want to use these functions as examples to help you define and implement your own user-defined functions: Data set prefix.SDSNSAMP contains the code for the sample functions.
  • The detailed descriptions of the functions include their external program names and specific names. The functions are in schema DSN8. The functions are defined to treat character or graphic string parameters, both input and output, as EBCDIC-encoded data.