MF Cobol and OS/2 DLLs 
Author Message
 MF Cobol and OS/2 DLLs

I have a problem with Micro Focus Cobol calling functions in an OS/2 DLL.

I have developed an OS/2 DLL in C for a client.  His EXE is written in
Micro Focus Cobol.  I understand that he can link with the LIB file I have
provided and successfully call the functions in the DLL.

The problem appears when he uses something called Animator (a visual
de{*filter*} of some kind?).  He says the functions are not found or not
executed.  He has talked with some people at MF and was told that he
cannot call functions in DLLs if he wants to use Animator to debug his app?
(His code is compiled to some sort of p-code?)

If I include debug information in my DLL during compiling and linking, will
the Animator thingie be happy?  What is the intermediate p-code my client
mentioned?  How (oh, how?!) can a de{*filter*} stand in the way of dynamic
linked code?

I'm afraid I don't have a clue when it comes to Cobol, but I'm hoping that
someone here has experience with linking MF Cobol programs to OS/2 DLLs
and might shed some light on this problem.

Many thanks in advance!

//----------------------------------------------------------

//



Sat, 16 Jan 1999 03:00:00 GMT  
 MF Cobol and OS/2 DLLs

I assume the COBOL is compiled to int code in order to Animate it? If
this is the case, then the COBOL runtime needs to be told about the
functions that are available in the C DLL before it can locate and call
them. If we assume that the DLL is called mydll.dll, then this can
be resolved by planting the following 'set .. to entry ..' statement
in the COBOL program before the first call to a function in the DLL:

  working-storage section.
  01 tmppptr            procedure-pointer.
  :
  procedure division.
    set tmppptr to entry "mydll.dll"  *> load entry points for this dll

    *> now call an entry point/function in the DLL
    call "aFunctionInMydll" using ...

Dave.


Quote:
> I have a problem with Micro Focus Cobol calling functions in an OS/2
DLL.

> I have developed an OS/2 DLL in C for a client.  His EXE is written in
> Micro Focus Cobol.  I understand that he can link with the LIB file I
have
> provided and successfully call the functions in the DLL.

> The problem appears when he uses something called Animator (a visual
> de{*filter*} of some kind?).  He says the functions are not found or not
> executed.  He has talked with some people at MF and was told that he
> cannot call functions in DLLs if he wants to use Animator to debug his
app?
> (His code is compiled to some sort of p-code?)

> If I include debug information in my DLL during compiling and linking,
will
> the Animator thingie be happy?  What is the intermediate p-code my
client
> mentioned?  How (oh, how?!) can a de{*filter*} stand in the way of dynamic
> linked code?

> I'm afraid I don't have a clue when it comes to Cobol, but I'm hoping
that
> someone here has experience with linking MF Cobol programs to OS/2 DLLs
> and might shed some light on this problem.

> Many thanks in advance!

> //----------------------------------------------------------

> //



Mon, 18 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to compile and link to C-DLL out of COBOL-DLL (MF)

2. Calling MF COBOL-DLL from VB

3. Calling C++ DLL from MF COBOL

4. REXX calling MF Cobol DLLs problem

5. MF Cobol and Windows NT DLLs

6. Releasing MF Cobol DLL

7. MF CObol and TCP/IP DLL?

8. Calling Win32 DLL Functions from MF COBOL

9. MF-COBOL and DLL's: Call shows strange errors

10. Help with MF Cobol being very slow under OS/2

11. MF COBOL V4.0 OS/2 Animator Cross Session Problems

12. calling a MF COBOL .dll (ver 3.2.50) from VB5

 

 
Powered by phpBB® Forum Software