Routines

A routine is a stored collection of programming statements that allows you to manipulate data.

A routine can be a function, which returns values, or a procedure, which does not. You can write routines in the HCL Informix® Stored Procedure Language (SPL), or in an external language, such as C or Java™.
Important: Not all routine options are available for SPL and Java. For more information, see the Informix DataBlade® Developers Kit User's Guide.

Routine overloading, or polymorphism, refers to writing a routine that performs the same task and has the same name as an existing routine-but one that takes a different data type as an argument. When you create opaque, collection, or row types, you can overload existing routines for your new data type. When the overloaded routine is called, your Informix database server determines which variant of the routine to use by examining the argument. BladeSmith creates a template for the overloaded routine; however, you must complete the code to enable the routine to complete the assigned task.

You can overload built-in and operator functions for all data types except built-in data types. You can create user-defined routines for all categories of data types. You can create support routines for all extended data types. You must create support routines for opaque data types (see Opaque data type support routines).