1.10.2 External C stored routines

This section describes external C stored routine names. Note that external C stored routines that contain SQL statements cannot be executed.

Organization of this subsection
(1) External C stored routine names

(1) External C stored routine names

External C stored routine names can be specified using CREATE PROCEDURE or CREATE FUNCTION. The external C procedure or function that you specify here serves as the external routine definition.

(a) Format

external-C-stored-routine-name::='C-library-file-name!external-function-identifier'

(b) Explanation
C-library-file-name
Specifies the name of the library file containing a function written in the C language.
Specify the C library file name as a file name only, not a path name.
external-function-identifier
Specifies the identifier of a C function in which the external C stored routine is actually coded.
(c) Rules
  1. The following characters are allowed in the specifications for each item:
    • C-library-file-name
      The following single-byte characters can be used:
      Upper-case and lower-case letters, numeric characters, underscores (_), dollar signs ($), periods (.), and hyphens (-)
    • external-function-identifier
      The following single-byte characters can be used:
      Upper-case and lower-case letters, numeric characters, and underscores (_)
  2. The first character of the external function identifier cannot be a numeric character.
  3. The total combined length of the C library file name and external function identifier cannot exceed 254 bytes.