Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > EXECUTE PROCEDURE >

Dynamic Routine-Name Specification of SPL Procedures

Dynamic routine-name specification simplifies the writing of an SPL routine that calls another SPL routine whose name is not known until runtime. To specify the name of an SPL routine in the EXECUTE PROCEDURE statement, instead of listing the explicit name of an SPL routine, you can use an SPL variable to hold the routine name.

If the SPL variable names an SPL routine that returns a value (an SPL function), include the INTO clause of EXECUTE PROCEDURE to specify a receiving variable (or variables) to hold the value (or values) that the SPL function returns. For more information on how to execute SPL procedures dynamically, see the IBM Informix Guide to SQL: Tutorial.

IFX_UNLOAD_MODULE Procedure (IDS, C)

The IFX_UNLOAD_MODULE procedure unloads a shared-object file from memory.

Read syntax diagramSkip visual syntax diagramIFX_UNLOAD_MODULE Procedure:
 
|--IFX_UNLOAD_MODULE--(--module_name--,--"C"--)-----------------|
 

Element Description Restrictions Syntax
module_name Full pathname of file to unload Shared-object file must exist and be unused. Pathname can be up to 255 characters long. Quoted String

The IFX_UNLOAD_MODULE procedure can only unload an unused shared-object file; that is, when no executing SQL statements (in any database) are using any UDRs in the specified shared-object file. If any UDR in the shared-object file is currently in use, then IFX_UNLOAD_MODULE raises an error.

On UNIX, for example, suppose you want to unload the circle.so shared library, which contains C UDRs. If this library resides in the /usr/apps/opaque_types directory, you can use the following EXECUTE PROCEDURE statement to execute the IFX_UNLOAD_MODULE procedure:

EXECUTE PROCEDURE ifx_unload_module(         "/usr/apps/opaque_types/circle.so", "C");   

On Windows, for example, suppose you want to unload the circle.dll dynamic link library, which contains C UDRs. If this library is in the C:\usr\apps\opaque_types directory, you can use the following EXECUTE PROCEDURE statement to execute the IFX_UNLOAD_MODULE procedure:

EXECUTE PROCEDURE ifx_unload_module(         "C:\usr\apps\opaque_types\circle.dll", "C");    

For more information on how to use IFX_UNLOAD_MODULE to unload a shared-object file, see the chapter on how to design a UDR in IBM Informix User-Defined Routines and Data Types Developer's Guide. For information on how to use the IFX_REPLACE_MODULE function, see IFX_REPLACE_MODULE Function (IDS, C).

Use the SQLJ Driver built-in procedures for one of the following tasks:

The SQLJ built-in procedures are stored in the sysprocedures system catalog table. They are grouped under the sqlj schema.

Tip:
For any Java static method, the first built-in procedure that you execute must be the sqlj.install_jar( ) procedure. You must install the jar file before you can create a UDR or map a user-defined data type to a Java type. Similarly, you cannot use any of the other SQLJ built-in procedures until you have used sqlj.install_jar( ).
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]