Informix function execution problem
Posted in 1999
Topics: Stored Procedures & SPL
Hi, There is a problem while executing a user defined function say "userfn" in Informix IUS database . This is a c language function. A shared library is made of this function. This function is defined in the informix database using "CREATE FUNCTION" alongwith the path of the shared library. At the execution time, there is an error : -9793 User-defined-routine module load failed. Description of error is: The following error message appears in the log: ERROR: Loading Module module_name A bad external name, missing file, or wrong permissions might cause this error. Log message log_message_number contains the UNIX error number no encountered and the actual module name being used. For C language on UNIX, the following log message might appear: Error_number: C Language Module module_name can't load error_string In the error message, error_number is the current UNIX error number, module_name is the module name from the catalog, and error_string is the dlerror() explanation. I have checked the file path and permissions. Those are set correctly. Pl advice. Thanks, Sandip
MSANDIP (MSANDIP@inf.com) wrote: : There is a problem while executing a user defined function say "userfn" in : Informix IUS database . a. Check that the .bld file exists in the location you think it does. i.e. do a 'file' command based on what is in the EXTERNAL NAME bit of the CREATE FUNCTION. b. Check that the symbol name you are referencing within that file exists. (Case counts, i.e. "userfn" in the 'C' program doesn't equal "USERFN" in the CREATE FUNCTION statement.) c. It's possible that you have mis-spelled a SAPI function name, or that you have somehow not resolved all of the function names in your .bld ar compile/link. Depending on your compiler, you should see a list of 'unresolved symbols' in the compile stage. To work, the only things that should appear in that list of names are functions implemented as part of SAPI. Hope this helps! KR Pb
This may have to do with permissions on the bld. Set them to rwx for informix only. MSANDIP wrote in message <7bnk05$iaq$1@news.xmission.com>... > > >Hi, > >There is a problem while executing a user defined function say "userfn" in >Informix IUS database . >This is a c language function. A shared library is made of this function. >This function is defined in the informix database using "CREATE FUNCTION" >alongwith the path of the shared library. >At the execution time, there is an error : -9793 User-defined-routine >module load failed. >Description of error is: >The following error message appears in the log: > > > >ERROR: Loading Module module_name > >A bad external name, missing file, or wrong permissions might cause > >this error. Log message log_message_number contains the UNIX error > >number no encountered and the actual module name being used. For C > >language on UNIX, the following log message might appear: > >Error_number: C Language Module module_name can't load error_string > >In the error message, error_number is the current UNIX error number, > >module_name is the module name from the catalog, and error_string is > >the dlerror() explanation. > >I have checked the file path and permissions. Those are set correctly. > >Pl advice. > >Thanks, >Sandip >