If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQL10013N - Failure loading Stored Procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 09:43
JSMatthews JSMatthews is offline
Registered User
 
Join Date: Dec 2003
Location: Ireland
Posts: 5
Unhappy SQL10013N - Failure loading Stored Procedure

Receiving error
SQLCode -10013
SQLerrmc - /home/db2inst1/sqllib/function/RELSPROC

Software:

RH Linux 7.2 (no fixpack)

DB2 EE v7.2 for LINUX
(no fixpack (have also tried with fixpack 7)) (Application Devlopment tools have been included)

MF Object COBOL OCDS 4.1.40 (for UNIX)

Trying to run a sample executable (compiled successfully using the MF cob compiler) but I am encountering SQL10013N - Cannot find directory or file /home/db2inst1/sqllib/function/RELSPROC. The sample executable cannot seem to load the stored procedure from the function directory - even though the Stored Procedure RELSPROC has been compiled successfully & is DEFINITELY in the function directory!! RELSPROC also seems to be defined OK in DB2 as well.

Micro Focus rts32 has been built successfully including libdb2.so sqlgmf.o
The rts32 has been copied to /opt/lib/cobol

All the environment variables (that I know about) seem to be set up & exported correctly:

COBDIR=/opt/lib/cobol
LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH:$COBDIR/coblib
PATH=$PATH:$HOME/bin:/usr/bin

DB2 specific environment variables set to:

DB2_STPROC_ALLOW_LOCAL_FENCED=FALSE
DB2LIBPATH=$LD_LIBRARY_PATH
DB2ENVLIST="PATH LD_LIBRARY_PATH COBDIR"

Does anyone have any ideas???!!!

BTW, I have had this running in a very similar environment where the only difference I know of is that RH v7.1 is installed instead of RH v7.2. Ive also had it working in yet another environment using RH v7.3 .... so Im guessing that RH v7.2 should be OK!!!

John
Reply With Quote
  #2 (permalink)  
Old 12-09-03, 05:06
JSMatthews JSMatthews is offline
Registered User
 
Join Date: Dec 2003
Location: Ireland
Posts: 5
I located the following error message in the /sqllib/db2dump/db2diag.log file:

"liboops.so: cannot open shared object file: no such file or directory"

liboops.so (& other MF Program library files & archives) is in directory
/opt/lib/cobol/coblib


The whole problem was resolved by creating symbolic links from /usr/lib to /opt/lib/cobol/coblib for all .a and .so files in opt/lib/cobol/coblib, but given I think I have all the correct environment variables set - to point to the correct shared libraries - what else needs to be done so that the symbolic links don't have to be created?

Environment variables that are set:

For my DB2 instance, I have exported
COBDIR=/opt/lib/cobol
&
LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH:$COBDIR/coblib

For my DB2 instance, I have
db2set DB2LIBPATH=$LD_LIBRARY_PATH
&
db2set DB2ENVLIST="PATH LD_LIBRARY_PATH COBDIR"

John
Reply With Quote
  #3 (permalink)  
Old 12-09-03, 05:22
JSMatthews JSMatthews is offline
Registered User
 
Join Date: Dec 2003
Location: Ireland
Posts: 5
BTW, here is an example procedure, to create symbolic links from /usr/lib to the Micro Focus language libraries:

1. su root
2. cd /usr/lib
3. ln -sf /opt/lib/cobol/coblib/*.a .
4. ln -sf /opt/lib/cobol/coblib/*.so .
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On