Call exe from Cobol program.

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Call exe from Cobol program.

Postby rajsara » Tue Oct 28, 2008 12:46 am


My goal is to call a function in a C++ application from my COBOL program. I am able to call an exported function in a Win32 C++ dll from my COBOL program using "CALL" statement. But I am not sure of how to call a function in a C++ application.

Consider, I have an Win32 C++ application, "MyApplication.exe" with two functions, "MyFunc1" and "MyFunc2" and I have an COBOL program, "CobolExec.CBL".

1. How can I call the functions, MyFunc1 and MyFunc2 from CobolExec.CBL ?

2. Should I first create another process for "MyApplication.exe" using CreateProcess from my cobol program? How should I do it?

Could you please help me by providing your inputs on how to implement this? I greatly appreciate your help in this regard. Expecting your earliest reply.
Thank you in advance.
Posts: 3
Joined: Sat Sep 20, 2008 6:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Call exe from Cobol program.


Re: Call exe from Cobol program.

Postby dick scherrer » Tue Oct 28, 2008 2:04 am


Which cobol compiler are you using?

What computer is running your application?
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 92 times

Return to IBM Cobol


  • Related topics
    Last post