Built-in routines

Built-in routines are routines that are provided with the product. These routines provide a wide variety of routine support for tasks ranging from administrative functions to database system and catalog reporting.

They are characterized by the fact that they are immediately ready-to-use, require no prerequisite setup or routine registration steps, although users require privileges to invoke these routines. These can include built-in routines and are also called SQL Administrative Routines.

Built-in routines provide standard operator support and basic scalar function and aggregate function support. Built-in routines are the first choice of routine that you should use because they are strongly typed and will provide the best performance. Do not create external routines that duplicate the behavior of built-in routines. External routines cannot perform as well as, or be as secure as, built-in routines.

Other built-in routines that you can use are provided with the database in the SYSPROC, SYSFUN, and SYSTOOLS schemas. These routines are essentially SQL and external routines that are defined by the system and provided with the product. Although these additional routines are shipped with the database, they are not built-in routines. Instead they are implemented as pre-installed user-defined routines. These routines typically encapsulate a utility function such as the REBIND_ROUTINE_PACKAGE procedure. You can immediately use these functions and procedures, provided that you have the SYSPROC schema and SYSFUN schema in your CURRENT PATH special register. You can peruse the set of built-in routines if you are considering implementing an external routine that performs administrative functions.

Of particular interest, you might find the ADMIN_CMD procedure useful as it provides a standard interface for executing many popular database commands through an SQL interface.

Built-in routines make it faster and easier for you to implement complex SQL queries and powerful database applications because they are ready-to-use.