Operating System - HP-UX
1825822 Members
3075 Online
109688 Solutions
New Discussion

Re: dlopen() not supporting for cobcall???

 
seema_rj
Occasional Contributor

dlopen() not supporting for cobcall???

I am a new comer to cobol. I have a query. Can any1 plz suggest how to link shared libraries at run time? i have an executeable 'post' for which i want to link a method 'Binmup' that is defined in a shared library libmup.sl. I can link this libmup.sl during compiling post program. Bt i dnt want to compile post program everytime i make change to libmup.sl so can any1 suggest how to link libmup.sl with out compiling post program.....i am using cobol program on HP-UX


for the above mentioned issue i used shl_load()and made my work done. But wile porting to other platforms its failing as shl_load is for HP-UX so i used dlopen() the library is getting loaded bt am not able to call cobol programs using cobcall() it throws some issue like this

Unresolved module for symbol: _tMc2406 (plabel) from /opt/cobol/cobdir/coblib

can you plz suggest me a solution???
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: dlopen() not supporting for cobcall???

dlopen and shl_load essentially work the same. You have that unsat symbol in both cases. Solve that and you are done.

You'll have to talk to a Micro Focus expert to see what _tMc2406 means.

>how to link shared libraries at run time?

A correction in terms, you are dynamically loading the shared lib, not linking.
seema_rj
Occasional Contributor

Re: dlopen() not supporting for cobcall???

Hi,
Thanx for that correction. I belive dlopen()
is loading the library properly. I tested by loading a C shared library and calling a function from it. It works fine. I get this issue only when i run through a cobcall(). so is ther any way out to load a cobal shared library and run an cobol application that can be ported on any platform??
Plz suggest
Dennis Handly
Acclaimed Contributor

Re: dlopen() not supporting for cobcall???

>I get this issue only when i run through a cobcall().

You are going to have to look at your MF documentation.