Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fj PGM can execute a Microfocus PGM ?

Status
Not open for further replies.

bluemaxit

Programmer
Oct 30, 2003
6
0
0
IT
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.

Thanks, Massimo.
 
There are probably several ways to do it however, here is one way. Go to Fujitsu web site ( 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.

etom
 
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]

Hope this helps.
 
The program Microfocus Cobol needs the runtime or I owes to link it in a particular way?

Thanks, Massimo
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top