I would like to know if the possibility exists to perform a program (exe) batch written in cobol Microfocus v 3.2.43 from a program writing in FJ Powercobol.
and download CALLEXE sample program. Create a Cobol97 DLL using the logic contained in this module and then call that DLL from your powercobol program. This is what I did so I could use it in multiple places however, the code may work right in your powercobol routines.
You can do this using the "ExecuteSync" or "Execute" method of a form. We used to do this to read MicroFocus files from Fujitsu until we figured out an easier way to do it. Both runtimes need to be available. ExecuteSync wait for the called application to exit before returning Execute does not.
Here is the format:
INVOKE pow-self "ExecuteSync" USING CommandLine [Show] RETURNING ReturnValue
INVOKE pow-self "Execute" USING CommandLine [Show]
The Micro Focus program needs to have the Micro Focus runtime avaiable. You can do this 2 ways. The shared runtime is not contained in the .exe and the runtime files must be in your path and you need a COBDIR environment variable set to the location of the runtime. This is how we do it here. The other option is the static linked runtime. With this the needed runtime files are linked into a single .exe. I have done this on a few occasions.
Linking options are covered in the manual COBOL System Reference Volume 1 Chapter 15. Hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.