Develop a user-defined routine
A C user-defined routine (UDR) is a UDR that is written in the C language and uses the server-side implementation of the DataBlade® API to communicate with the database server. C UDRs (functions and procedures) are implemented as C-language functions. DataBlade® modules often include C UDRs that are made available for use by registering them in the database.
- Design the use and development process for the UDR
- Code a C routine that uses the DataBlade® API functions to interact with the database server
- Compile and link the C routine to create a shared-object file
- Register the C routine with the CREATE FUNCTION or CREATE PROCEDURE statement
- Execute the UDR
- Use tracing and the debugging features to work out any problems in the UDR
- Change any characteristics of the UDR that are required during its lifetime
- Optimize performance of the UDR
This section describes each of these steps in the development of a C UDR. For general information about the development steps of a UDR, see the Informix® User-Defined Routines and Data Types Developer's Guide.
This section covers topics specific to the development of a C UDR. This material does not apply to the creation of client LIBMI applications with the client-side implementation of the DataBlade® API.